mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -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:
|
;;; Code:
|
||||||
|
|
||||||
(eval-when-compile (require 'cl))
|
(eval-when-compile (require 'cl))
|
||||||
(require 'thingatpt)
|
|
||||||
|
|
||||||
;; Compatibility code
|
;; Compatibility code
|
||||||
|
|
||||||
|
|
@ -200,14 +199,14 @@ KEYWORD is the keyword expected."
|
||||||
(signal 'json-unknown-keyword
|
(signal 'json-unknown-keyword
|
||||||
(list (save-excursion
|
(list (save-excursion
|
||||||
(backward-word 1)
|
(backward-word 1)
|
||||||
(word-at-point)))))
|
(thing-at-point 'word)))))
|
||||||
(json-advance))
|
(json-advance))
|
||||||
keyword)
|
keyword)
|
||||||
(unless (looking-at "\\(\\s-\\|[],}]\\|$\\)")
|
(unless (looking-at "\\(\\s-\\|[],}]\\|$\\)")
|
||||||
(signal 'json-unknown-keyword
|
(signal 'json-unknown-keyword
|
||||||
(list (save-excursion
|
(list (save-excursion
|
||||||
(backward-word 1)
|
(backward-word 1)
|
||||||
(word-at-point)))))
|
(thing-at-point 'word)))))
|
||||||
(cond ((string-equal keyword "true") t)
|
(cond ((string-equal keyword "true") t)
|
||||||
((string-equal keyword "false") json-false)
|
((string-equal keyword "false") json-false)
|
||||||
((string-equal keyword "null") json-null)))
|
((string-equal keyword "null") json-null)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue