mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
(json-advance): Use forward-char.
(json-skip-whitespace): Use skip-syntax-forward.
This commit is contained in:
parent
e9701d1680
commit
ac611f4ffa
@ -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 " "))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user