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


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Pip Cet <pipcet <at> gmail.com>
Cc: Mattias Engdegård <mattiase <at> acm.org>, Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefan <at> marxist.se>, 40968 <at> debbugs.gnu.org
Subject: bug#40968: 28.0.50; (apply nil)
Date: Thu, 07 May 2020 08:20:37 -0400
Pip Cet <pipcet <at> gmail.com> writes:

> On Thu, May 7, 2020 at 11:54 AM Noam Postavsky <npostavs <at> gmail.com> wrote:
>> -      (byte-optimize-apply `(apply #'funcall ,(cadr form)))
>> +      (byte-optimize-apply `(apply (car ,(cadr form)) (cdr ,(cadr form))))
>
> That double-evaluates (cadr form), doesn't it?

Oops, right.  Then let me go back to "don't optimize that case" (i.e.,
just return form).

>> +  if (nargs == 1)
>> +    /* Special case: FUN is really a list of (FUNCTION . ARGS).  */
>> +    return CALLN (Fapply, CAR (fun), CDR (fun));
>
> But what if someone defines nil as a function (not serious)?

Emacs doesn't care if you're serious; it has an answer ready for you
anyway:

    (defun nil () t) ;=> Cannot define ’nil’ as a function




This bug report was last modified 4 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.