[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Percent sign in message
From: |
David Kastrup |
Subject: |
Re: Percent sign in message |
Date: |
Tue, 12 Sep 2006 00:13:14 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> 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
- Percent sign in message, Whitfield Diffie, 2006/09/11
- Re: Percent sign in message, Michaƫl Cadilhac, 2006/09/11
- Re: Percent sign in message, Whitfield Diffie, 2006/09/11
- Re: Percent sign in message, David Kastrup, 2006/09/11
- Re: Percent sign in message, Kim F. Storm, 2006/09/11
- Re: Percent sign in message, Stefan Monnier, 2006/09/11
- Re: Percent sign in message, Richard Stallman, 2006/09/11
- Re: Percent sign in message, Stefan Monnier, 2006/09/11
- Re: Percent sign in message, David Kastrup, 2006/09/11
- Re: Percent sign in message, Stefan Monnier, 2006/09/11
- Re: Percent sign in message,
David Kastrup <=
- Re: Percent sign in message, Stefan Monnier, 2006/09/11
- Re: Percent sign in message, Richard Stallman, 2006/09/12
- Re: Percent sign in message, David Kastrup, 2006/09/12
- Re: Percent sign in message, Stuart D. Herring, 2006/09/19
- Re: Percent sign in message, David Kastrup, 2006/09/19