summaryrefslogtreecommitdiff
path: root/lisp/json.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-10-07 16:18:22 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-10-07 16:18:22 +0000
commitac611f4ffaa0c8d8f62f0d77f425b0df2e652602 (patch)
tree7c2363c2a5919f1d3eb851174d2410b339f0efc1 /lisp/json.el
parente9701d16807d111687caf17a05679155a98c83e7 (diff)
downloademacs-ac611f4ffaa0c8d8f62f0d77f425b0df2e652602.tar.gz
(json-advance): Use forward-char.
(json-skip-whitespace): Use skip-syntax-forward.
Diffstat (limited to 'lisp/json.el')
-rw-r--r--lisp/json.el9
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/json.el b/lisp/json.el
index 38ec16f5db7..203ec596980 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -123,11 +123,7 @@ this around your call to `json-read' instead of `setq'ing it.")
(defsubst json-advance (&optional n)
"Skip past the following N characters."
- (unless n (setq n 1))
- (let ((goal (+ (point) n)))
- (goto-char goal)
- (when (< (point) goal)
- (signal 'end-of-file nil))))
+ (forward-char n))
(defsubst json-peek ()
"Return the character at point."
@@ -144,8 +140,7 @@ this around your call to `json-read' instead of `setq'ing it.")
(defun json-skip-whitespace ()
"Skip past the whitespace at point."
- (while (looking-at "[\t\r\n\f\b ]")
- (goto-char (match-end 0))))
+ (skip-syntax-forward " "))