aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEra Eriksson2015-02-05 14:52:03 -0500
committerStefan Monnier2015-02-05 14:52:03 -0500
commit6aa04a5570b50a68665e69231f3e36b2a4625f40 (patch)
tree71c5c3f494ce7f86fc1652174cb5b7074afef290 /lisp
parentf06902840eff62e83858a40b4e139b61d254107a (diff)
downloademacs-6aa04a5570b50a68665e69231f3e36b2a4625f40.tar.gz
emacs-6aa04a5570b50a68665e69231f3e36b2a4625f40.zip
* lisp/json.el (json-end-of-file): New error.
Fixes: debbugs:19768 (json-pop, json-read): Use it.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/json.el6
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a1e43e14c7b..9838d68f7d3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-02-05 Era Eriksson <era+emacs@iki.fi>
2
3 * json.el (json-end-of-file): New error (bug#19768).
4 (json-pop, json-read): Use it.
5
12015-02-05 Kelly Dean <kelly@prtime.org> 62015-02-05 Kelly Dean <kelly@prtime.org>
2 7
3 * help-mode.el (help-xref-interned): Pass BUFFER and FRAME to 8 * help-mode.el (help-xref-interned): Pass BUFFER and FRAME to
@@ -14384,7 +14389,7 @@
14384 Change default to "# encoding: %s" to differentiate it from the 14389 Change default to "# encoding: %s" to differentiate it from the
14385 default Ruby encoding comment template. 14390 default Ruby encoding comment template.
14386 14391
143872013-11-20 era eriksson <era+emacsbugs@iki.fi> 143922013-11-20 Era Eriksson <era+emacsbugs@iki.fi>
14388 14393
14389 * ses.el (ses-mode): Doc fix. (Bug#14748) 14394 * ses.el (ses-mode): Doc fix. (Bug#14748)
14390 14395
diff --git a/lisp/json.el b/lisp/json.el
index 68ab020c379..98974e67b7e 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -166,7 +166,7 @@ without indentation.")
166 "Advance past the character at point, returning it." 166 "Advance past the character at point, returning it."
167 (let ((char (json-peek))) 167 (let ((char (json-peek)))
168 (if (eq char :json-eof) 168 (if (eq char :json-eof)
169 (signal 'end-of-file nil) 169 (signal 'json-end-of-file nil)
170 (json-advance) 170 (json-advance)
171 char))) 171 char)))
172 172
@@ -186,6 +186,8 @@ without indentation.")
186(define-error 'json-string-format "Bad string format" 'json-error) 186(define-error 'json-string-format "Bad string format" 'json-error)
187(define-error 'json-key-format "Bad JSON object key" 'json-error) 187(define-error 'json-key-format "Bad JSON object key" 'json-error)
188(define-error 'json-object-format "Bad JSON object" 'json-error) 188(define-error 'json-object-format "Bad JSON object" 'json-error)
189(define-error 'json-end-of-file "End of file while parsing JSON"
190 '(end-of-file json-error))
189 191
190 192
191 193
@@ -554,7 +556,7 @@ Advances point just past JSON object."
554 (if (functionp (car record)) 556 (if (functionp (car record))
555 (apply (car record) (cdr record)) 557 (apply (car record) (cdr record))
556 (signal 'json-readtable-error record))) 558 (signal 'json-readtable-error record)))
557 (signal 'end-of-file nil)))) 559 (signal 'json-end-of-file nil))))
558 560
559;; Syntactic sugar for the reader 561;; Syntactic sugar for the reader
560 562