From: David Kastrup <dak@gnu.org>
Cc: whitfield.diffie@sun.com, storm@cua.dk,
michael.cadilhac@lrde.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Percent sign in message
Date: Tue, 12 Sep 2006 00:13:14 +0200 [thread overview]
Message-ID: <85ac56dpc5.fsf@lola.goethe.zz> (raw)
In-Reply-To: <jwvlkoq9i1u.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon\, 11 Sep 2006 18\:05\:22 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> Of course, we could also add a compiler warning whenever we see
>>>> (message <exp>) and <exp> is not a constant string.
>>>
>>>> I think that would give too many false warnings, because it is not
>>>> unusual to obtain the format string from some non-constant source.
>>>
>>> Could be. But the warning can be turned off by using (message "%s" <exp>).
>
>> That would need to be
>> (message "%s" (format <exp>))
>
> Well, only if <exp> contains escaped % signs. It's generally not
> the case.
>
>> It is not unusual to obtain a _format_ string from some non-constant
>> source.
>
> But it then comes with some arguments as well, doesn't it?
So what you mean is not
"the warning can be turned off by using (message "%s" <exp>)"
but rather
"the warning can be turned off by using (message <exp> <exp>+)"
Namely: warn if we use a _single_ non-constant expression as argument,
but don't complain if we use more than one expression as argument.
I'd consider that a good idea, but I find it hard to gather this as
your proposal from the wording you used.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2006-09-11 22:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-11 6:15 Percent sign in message Whitfield Diffie
2006-09-11 6:38 ` Michaël Cadilhac
2006-09-11 6:57 ` Whitfield Diffie
2006-09-11 7:18 ` David Kastrup
2006-09-11 8:26 ` Kim F. Storm
2006-09-11 14:07 ` Stefan Monnier
2006-09-11 19:57 ` Richard Stallman
2006-09-11 21:00 ` Stefan Monnier
2006-09-11 21:03 ` David Kastrup
2006-09-11 22:05 ` Stefan Monnier
2006-09-11 22:13 ` David Kastrup [this message]
2006-09-12 3:20 ` Stefan Monnier
2006-09-12 15:27 ` Richard Stallman
2006-09-12 15:37 ` David Kastrup
2006-09-19 19:39 ` Stuart D. Herring
2006-09-19 21:49 ` David Kastrup
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=85ac56dpc5.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael.cadilhac@lrde.org \
--cc=rms@gnu.org \
--cc=storm@cua.dk \
--cc=whitfield.diffie@sun.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.