all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: 30489@debbugs.gnu.org
Subject: bug#30489: 26.0.91; [PATCH] Data associated with json-readtable-error not a list
Date: Fri, 16 Feb 2018 17:29:43 +0000	[thread overview]
Message-ID: <87sha09720.fsf@tcd.ie> (raw)

[-- 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)

             reply	other threads:[~2018-02-16 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 17:29 Basil L. Contovounesios [this message]
2018-03-16  2:39 ` bug#30489: 26.0.91; [PATCH] Data associated with json-readtable-error not a list 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sha09720.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=30489@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.