From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Calling message with a single arg (was: [Emacs-diffs] emacs-26 5f39260: * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to message) Date: Tue, 27 Nov 2018 13:15:14 -0500 Message-ID: References: <20181127162510.11435.53940@vcs0.savannah.gnu.org> <20181127162511.E45572047B@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1543342413 14527 195.159.176.226 (27 Nov 2018 18:13:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 18:13:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 27 19:13:29 2018 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 1gRhrQ-0003aa-LU for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2018 19:13:24 +0100 Original-Received: from localhost ([::1]:43874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRhtW-0003Ml-QY for ged-emacs-devel@m.gmane.org; Tue, 27 Nov 2018 13:15:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRhtK-0003LE-8n for emacs-devel@gnu.org; Tue, 27 Nov 2018 13:15:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRhtG-0001NN-Bg for emacs-devel@gnu.org; Tue, 27 Nov 2018 13:15:22 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRhtG-0001Ma-3o for emacs-devel@gnu.org; Tue, 27 Nov 2018 13:15:18 -0500 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wARIFE7p009168; Tue, 27 Nov 2018 13:15:15 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8B7A9AE5BB; Tue, 27 Nov 2018 13:15:14 -0500 (EST) In-Reply-To: <20181127162511.E45572047B@vcs0.savannah.gnu.org> (Glenn Morris's message of "Tue, 27 Nov 2018 11:25:11 -0500 (EST)") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 3 Rules triggered LNG_SB_1=0.2, EDT_SA_DN_PASS=0, RV6427=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6427> : inlines <6972> : streams <1805503> : uri <2756631> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:231453 Archived-At: > - (message (or msg ""))) > + (if msg > + (message "%s" msg) > + (message ""))) I wish we'd just change `message` so that (message STR) is treated as (message "%s" STR). While it might theoretically introduce some breakage at places that double % signs before calling `message` (tho those places are better served by (message "%s" STR) so there should be precious few sufferers), I suspect that it will fix more places that naively call (message STR) without realizing that STR might contain % chars that are treated as formatting codes. Stefan