unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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)
       [not found] ` <20181127162511.E45572047B@vcs0.savannah.gnu.org>
@ 2018-11-27 18:15   ` Stefan Monnier
  2018-11-27 18:48     ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2018-11-27 18:15 UTC (permalink / raw)
  To: emacs-devel

> -      (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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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)
  2018-11-27 18:15   ` 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) Stefan Monnier
@ 2018-11-27 18:48     ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2018-11-27 18:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Tue, 27 Nov 2018 13:15:14 -0500
> 
> I wish we'd just change `message` so that (message STR) is treated as
> (message "%s" STR).

Didn't we have enough trouble from similar changes in related
departments lately?  I say let's rest for a while before the next
revolution, shall we?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-27 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20181127162510.11435.53940@vcs0.savannah.gnu.org>
     [not found] ` <20181127162511.E45572047B@vcs0.savannah.gnu.org>
2018-11-27 18:15   ` 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) Stefan Monnier
2018-11-27 18:48     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).