diff options
Diffstat (limited to 'lisp/json.el')
| -rw-r--r-- | lisp/json.el | 6 |
1 files changed, 4 insertions, 2 deletions
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 | ||