From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: error message without quotes translation Date: Wed, 31 Aug 2016 23:08:25 -0700 Organization: UCLA Computer Science Department Message-ID: <7e97dbf5-602e-53fe-ce4c-ac2cf3908b7d@cs.ucla.edu> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------C7ED9955D0396D4A780E2308" X-Trace: blaine.gmane.org 1472710128 8368 195.159.176.226 (1 Sep 2016 06:08:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 06:08:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 08:08:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfLB4-0001ZM-Lh for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 08:08:42 +0200 Original-Received: from localhost ([::1]:57330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfLB2-0003Mj-BM for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 02:08:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfLAv-0003Me-SD for emacs-devel@gnu.org; Thu, 01 Sep 2016 02:08:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfLAq-0006zs-PW for emacs-devel@gnu.org; Thu, 01 Sep 2016 02:08:32 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfLAq-0006zm-Jc for emacs-devel@gnu.org; Thu, 01 Sep 2016 02:08:28 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7237F161171; Wed, 31 Aug 2016 23:08:27 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2IMIxOSJqlID; Wed, 31 Aug 2016 23:08:26 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 48AEF161396; Wed, 31 Aug 2016 23:08:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AbwaqbVYTJlR; Wed, 31 Aug 2016 23:08:26 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 27775161171; Wed, 31 Aug 2016 23:08:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207044 Archived-At: This is a multi-part message in MIME format. --------------C7ED9955D0396D4A780E2308 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------C7ED9955D0396D4A780E2308 Content-Type: text/x-diff; name="0001-Fix-over-substitution-of-quotes-on-error.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-over-substitution-of-quotes-on-error.patch" >From 83f79ea8f4704444e6a3f88f5890d06904e574cb Mon Sep 17 00:00:00 2001 From: Paul Eggert 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 --------------C7ED9955D0396D4A780E2308--