[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40968: 28.0.50; (apply nil)
From: |
Drew Adams |
Subject: |
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.
- bug#40968: 28.0.50; (apply nil), (continued)
- bug#40968: 28.0.50; (apply nil), Eli Zaretskii, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Pip Cet, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Eli Zaretskii, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Drew Adams, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Noam Postavsky, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Drew Adams, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Pip Cet, 2020/05/06
- bug#40968: 28.0.50; (apply nil),
Drew Adams <=
- bug#40968: 28.0.50; (apply nil), Eli Zaretskii, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Drew Adams, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Phil Sainty, 2020/05/06
- bug#40968: 28.0.50; (apply nil), Drew Adams, 2020/05/06
bug#40968: 28.0.50; (apply nil), Mattias Engdegård, 2020/05/06
bug#40968: 28.0.50; (apply nil), Mattias Engdegård, 2020/05/06