From: Paul Eggert <eggert@cs.ucla.edu>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: error message without quotes translation
Date: Wed, 31 Aug 2016 23:08:25 -0700 [thread overview]
Message-ID: <7e97dbf5-602e-53fe-ce4c-ac2cf3908b7d@cs.ucla.edu> (raw)
In-Reply-To: <alpine.DEB.2.20.1609011315390.22519@calancha-pc>
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
Tino Calancha wrote:
> From the above entry i expect the same works for `error' as well:
> (error "%s" (format "`Symbol' 'foo"))
Yes, there's a bug there. Thanks for reporting it. I fixed it in master by
installing the attached.
[-- Attachment #2: 0001-Fix-over-substitution-of-quotes-on-error.patch --]
[-- Type: text/x-diff, Size: 1314 bytes --]
From 83f79ea8f4704444e6a3f88f5890d06904e574cb Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 31 Aug 2016 23:05:48 -0700
Subject: [PATCH] Fix over-substitution of quotes on error
Problem reported by Tino Calancha in:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00000.html
* src/print.c (print_error_message):
Substitute quotes in errmsg only when gotten from a property.
---
src/print.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/print.c b/src/print.c
index 5531210..d54a7c9 100644
--- a/src/print.c
+++ b/src/print.c
@@ -920,7 +920,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
else
{
Lisp_Object error_conditions = Fget (errname, Qerror_conditions);
- errmsg = Fget (errname, Qerror_message);
+ errmsg = Fsubstitute_command_keys (Fget (errname, Qerror_message));
file_error = Fmemq (Qfile_error, error_conditions);
}
@@ -939,7 +939,7 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
if (!STRINGP (errmsg))
write_string_1 ("peculiar error", stream);
else if (SCHARS (errmsg))
- Fprinc (Fsubstitute_command_keys (errmsg), stream);
+ Fprinc (errmsg, stream);
else
sep = NULL;
--
2.7.4
next prev parent reply other threads:[~2016-09-01 6:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 4:19 error message without quotes translation Tino Calancha
2016-09-01 6:08 ` Paul Eggert [this message]
2016-09-01 8:47 ` Tino Calancha
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=7e97dbf5-602e-53fe-ce4c-ac2cf3908b7d@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=tino.calancha@gmail.com \
/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.