1
Fork 0
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:
Glenn Morris 2008-02-22 03:56:25 +00:00
parent 281b9aa888
commit f62e3e0a29

View file

@ -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)))