unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30489: 26.0.91; [PATCH] Data associated with json-readtable-error not a list
@ 2018-02-16 17:29 Basil L. Contovounesios
  2018-03-16  2:39 ` Noam Postavsky
  2018-03-16 23:47 ` Noam Postavsky
  0 siblings, 2 replies; 10+ messages in thread
From: Basil L. Contovounesios @ 2018-02-16 17:29 UTC (permalink / raw)
  To: 30489

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-lisp-json.el-json-readtable-dispatch-Fix-error-data.patch --]
[-- Type: text/x-diff, Size: 820 bytes --]

From d297d156fec4d141c6287d3da4e7aa538280b43e Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Fri, 16 Feb 2018 17:11:49 +0000
Subject: [PATCH] * lisp/json.el (json-readtable-dispatch): Fix error data

---
 lisp/json.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/json.el b/lisp/json.el
index b03a482ca6..b3267df6e5 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -685,7 +685,7 @@ json-readtable-dispatch
       (push (list c 'json-read-number) table))
     (pcase-dolist (`(,c . ,rest) table)
       (push `((eq ,char ,c) (,@rest)) res))
-    `(cond ,@res (t (signal 'json-readtable-error ,char)))))
+    `(cond ,@res (t (signal 'json-readtable-error ,(list char))))))
 
 (defun json-read ()
   "Parse and return the JSON object following point.
-- 
2.15.1


[-- Attachment #2: Type: text/plain, Size: 517 bytes --]


When signalling json-readtable-error, the macro json-readtable-dispatch
passes the unrecognised character as error data verbatim, rather than as
a list.  Attached is a patch which fixes this.

Thanks,

-- 
Basil

In GNU Emacs 26.0.91 (build 3, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-02-16 built on thunk
Repository revision: edc06adf96f4aa9d8b707181015acfe61d396edb
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Debian GNU/Linux testing (buster)

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-19  3:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-16 17:29 bug#30489: 26.0.91; [PATCH] Data associated with json-readtable-error not a list Basil L. Contovounesios
2018-03-16  2:39 ` Noam Postavsky
2018-03-16  3:36   ` Eli Zaretskii
2018-03-16  9:52     ` Noam Postavsky
2018-03-16 14:07       ` Eli Zaretskii
2018-03-16 23:47 ` Noam Postavsky
2018-03-18  0:14   ` Basil L. Contovounesios
2018-03-18  0:25     ` Noam Postavsky
2018-03-18 14:23       ` Basil L. Contovounesios
2018-03-19  3:14         ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).