Commit f62e3e0a authored by Glenn Morris's avatar Glenn Morris
Browse files

(top-level): No need to require thingatpt.

(json-read-keyword): Use thing-at-point rather than word-at-point.
parent 281b9aa8
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment