Subject: 26.0.91; [PATCH] Data associated with json-readtable-error not a list

From: "Basil L. Contovounesios" <[email-masked]>
Date: Fri, 16 Feb 2018 17:29:43 +0000

>From d297d156fec4d141c6287d3da4e7aa538280b43e Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <[email-masked]>
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

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)