mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(top-level): No need to require thingatpt.
(json-read-keyword): Use thing-at-point rather than word-at-point.
This commit is contained in:
parent
281b9aa888
commit
f62e3e0a29
1 changed files with 2 additions and 3 deletions
|
|
@ -53,7 +53,6 @@
|
|||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'thingatpt)
|
||||
|
||||
;; Compatibility code
|
||||
|
||||
|
|
@ -200,14 +199,14 @@ KEYWORD is the keyword expected."
|
|||
(signal 'json-unknown-keyword
|
||||
(list (save-excursion
|
||||
(backward-word 1)
|
||||
(word-at-point)))))
|
||||
(thing-at-point 'word)))))
|
||||
(json-advance))
|
||||
keyword)
|
||||
(unless (looking-at "\\(\\s-\\|[],}]\\|$\\)")
|
||||
(signal 'json-unknown-keyword
|
||||
(list (save-excursion
|
||||
(backward-word 1)
|
||||
(word-at-point)))))
|
||||
(thing-at-point 'word)))))
|
||||
(cond ((string-equal keyword "true") t)
|
||||
((string-equal keyword "false") json-false)
|
||||
((string-equal keyword "null") json-null)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue