all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <jwvefb6ie6d.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <20181127162511.E45572047B@vcs0.savannah.gnu.org> (Glenn Morris's message of "Tue, 27 Nov 2018 11:25:11 -0500 (EST)")

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



       reply	other threads:[~2018-11-27 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181127162510.11435.53940@vcs0.savannah.gnu.org>
     [not found] ` <20181127162511.E45572047B@vcs0.savannah.gnu.org>
2018-11-27 18:15   ` Stefan Monnier [this message]
2018-11-27 18:48     ` 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) Eli Zaretskii

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=jwvefb6ie6d.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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.