GNU bug report logs - #40968
28.0.50; (apply nil)

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Wed, 29 Apr 2020 18:27:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Drew Adams <drew.adams <at> oracle.com>
To: Pip Cet <pipcet <at> gmail.com>
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: RE: bug#40968: 28.0.50; (apply nil)
Date: Wed, 6 May 2020 12:28:21 -0700 (PDT)
> > And if Elisp follows that (which I think it should,
> > unless someone can present a good use case for just
> > (apply FUNCTION)), then it should raise an error if
> > there are not at least two args.
> 
> Note that single-argument apply in current Elisp is not (apply
> FUNCTION) but (apply LIST-OF-FUNCTION-PLUS-ARGS).
> 
> (apply '+) is an error.
> (apply '(+)) is 0.
> 
> That's why the problem with (apply nil) arose.

I think (apply '(+)) should raise an error, because
(a) the first arg is not a function and (b) it's
missing a second arg.

I think (apply ()) should raise an error for the
same reason: nil is not a function, and there's no
second arg.




This bug report was last modified 4 years and 239 days ago.

Previous Next


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