Commit ac611f4f authored by Chong Yidong's avatar Chong Yidong
Browse files

(json-advance): Use forward-char.

(json-skip-whitespace): Use skip-syntax-forward.
parent e9701d16
......@@ -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 " "))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment