(json-skip-whitespace): Use skip-syntax-forward.
(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."
(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 " "))
\f