diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-10-07 16:18:22 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-10-07 16:18:22 +0000 |
commit | ac611f4ffaa0c8d8f62f0d77f425b0df2e652602 (patch) | |
tree | 7c2363c2a5919f1d3eb851174d2410b339f0efc1 /lisp/json.el | |
parent | e9701d16807d111687caf17a05679155a98c83e7 (diff) | |
download | emacs-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.el | 9 |
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 " ")) |