[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20241: 25.0.50; `setq' with only one argument
From: |
Alan Mackenzie |
Subject: |
bug#20241: 25.0.50; `setq' with only one argument |
Date: |
Wed, 25 Nov 2015 20:58:51 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello, John.
On Wed, Nov 25, 2015 at 11:40:15AM -0800, John Wiegley wrote:
> >>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:
> > This is a bug then (probably in the advertised-calling-convention of
> > funcall). Functions called with the wrong number of arguments are usually
> > reported as warnings by the byte-compiler.
> Ok, let's go with this then:
> Evaluation: Run-time error
> Compilation: Compile-time warning
> Execution: Run-time error (same as Evaluation)
I can live with that.
> I think that's the convergence point for the three of us, amirite?
Things are never that simple. In evaluation, we now get the signal
"wrong-number-of-args setq 17". The first eight set operations are not
carried out.
In compilation, currently a warning message (called an "Error") is
emitted, and code is generated to perform 9 set operations (the last one
to nil). This needs to change.
How about enhancing the definition of setq to say that with 17
arguments, NONE of the assignments are done? This should be relatively
straight forward to code up in the byte compiler, even in the lexical
binding case.
Or, alternatively, we could explicitly say that whether the first 8
assignments are carried out before signaling the error is undefined.
This should deter over-clever hackers from trying to catch the
wrong-number-of-args error, expecting the code to have done something
predictable.
> John
--
Alan Mackenzie (Nuremberg, Germany).
- bug#20241: 25.0.50; `setq' with only one argument, (continued)
- bug#20241: 25.0.50; `setq' with only one argument, Drew Adams, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Drew Adams, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Wiegley, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Drew Adams, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Wiegley, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Wiegley, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument,
Alan Mackenzie <=
- bug#20241: 25.0.50; `setq' with only one argument, Drew Adams, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Wiegley, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, John Mastro, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Johan Bockgård, 2015/11/25
- bug#20241: 25.0.50; `setq' with only one argument, Andreas Schwab, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Alan Mackenzie, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Artur Malabarba, 2015/11/26
- bug#20241: 25.0.50; `setq' with only one argument, Nicolas Richard, 2015/11/25