# HG changeset patch # User Chong Yidong # Date 1223396302 0 # Node ID 4b085b844163fcdd6c4c886c2eb2bd0a570f223b # Parent b96285d2e930872744cb8918e6c5561747b9eea3 (json-advance): Use forward-char. (json-skip-whitespace): Use skip-syntax-forward. diff -r b96285d2e930 -r 4b085b844163 lisp/json.el --- 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 " "))