Mercurial > emacs
changeset 98553:4b085b844163
(json-advance): Use forward-char.
(json-skip-whitespace): Use skip-syntax-forward.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 07 Oct 2008 16:18:22 +0000 |
parents | b96285d2e930 |
children | feee2c660e49 |
files | lisp/json.el |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/json.el Tue Oct 07 16:18:01 2008 +0000 +++ b/lisp/json.el Tue Oct 07 16:18:22 2008 +0000 @@ -123,11 +123,7 @@ (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 @@ (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 " "))