GNU bug report logs - #20241
25.0.50; `setq' with only one argument

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 1 Apr 2015 14:54:02 UTC

Severity: wishlist

Found in version 25.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #91 received at 20241 <at> debbugs.gnu.org (full text, mbox):

From: John Mastro <john.b.mastro <at> gmail.com>
To: John Wiegley <jwiegley <at> gmail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 20241 <at> debbugs.gnu.org,
 Artur Malabarba <bruce.connor.am <at> gmail.com>,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#20241: 25.0.50; `setq' with only one argument
Date: Wed, 25 Nov 2015 11:21:04 -0800
John Wiegley <jwiegley <at> gmail.com> wrote:
> Let's take a different case as a behavorial example:
>
>   The code: (funcall)
>
>   Interpreted: Raises an error: eval: Wrong number of arguments: funcall, 0
>
>   Byte-compilation: No warnings or errors printed.
>
>   Loading of .elc: Raises an error: load: Wrong number of arguments: funcall, 0
>
> I think that we should be consistent in our behavior. Mis-using Emacs Lisp is
> not a reason to fail to byte-compile, even if it is a reason for it to fail to
> evaluate or load.
>
> A separate argument could be made that bad code shouldn't compile, but that's
> orthogonal to this discussion, and too big a pill to swallow for 25.1.

As an additional point of comparison, the form `(if)' causes a warning
(but not an error) during byte-compilation.

bad-if.el:3:1:Warning: too few arguments for ‘if’

I checked its behavior since `funcall' is a function whereas `setq' is a
special form, so I was interested to see if the precedent there was
different.

-- 
john




This bug report was last modified 9 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.