aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-02-22 03:56:25 +0000
committerGlenn Morris2008-02-22 03:56:25 +0000
commitf62e3e0a291a6d95ff65b15451d04bcc1457a22d (patch)
tree7404e116bdb8844247caa35cc2ca5f89302e71b9
parent281b9aa888f36ed4504be5776188d0dde4f7e5f7 (diff)
downloademacs-f62e3e0a291a6d95ff65b15451d04bcc1457a22d.tar.gz
emacs-f62e3e0a291a6d95ff65b15451d04bcc1457a22d.zip
(top-level): No need to require thingatpt.
(json-read-keyword): Use thing-at-point rather than word-at-point.
-rw-r--r--lisp/json.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/json.el b/lisp/json.el
index 787ea0eb7ce..64d6f03a780 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -53,7 +53,6 @@
53;;; Code: 53;;; Code:
54 54
55(eval-when-compile (require 'cl)) 55(eval-when-compile (require 'cl))
56(require 'thingatpt)
57 56
58;; Compatibility code 57;; Compatibility code
59 58
@@ -200,14 +199,14 @@ KEYWORD is the keyword expected."
200 (signal 'json-unknown-keyword 199 (signal 'json-unknown-keyword
201 (list (save-excursion 200 (list (save-excursion
202 (backward-word 1) 201 (backward-word 1)
203 (word-at-point))))) 202 (thing-at-point 'word)))))
204 (json-advance)) 203 (json-advance))
205 keyword) 204 keyword)
206 (unless (looking-at "\\(\\s-\\|[],}]\\|$\\)") 205 (unless (looking-at "\\(\\s-\\|[],}]\\|$\\)")
207 (signal 'json-unknown-keyword 206 (signal 'json-unknown-keyword
208 (list (save-excursion 207 (list (save-excursion
209 (backward-word 1) 208 (backward-word 1)
210 (word-at-point))))) 209 (thing-at-point 'word)))))
211 (cond ((string-equal keyword "true") t) 210 (cond ((string-equal keyword "true") t)
212 ((string-equal keyword "false") json-false) 211 ((string-equal keyword "false") json-false)
213 ((string-equal keyword "null") json-null))) 212 ((string-equal keyword "null") json-null)))