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

View file

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