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 #141 received at 40968 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Pip Cet <pipcet <at> gmail.com>
Cc: 40968 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#40968: 28.0.50; (apply nil)
Date: Mon, 28 Sep 2020 23:00:18 -0400
> as implying that (apply FUNCTION) is equivalent to (funcall FUNCTION)

I think the current half-broken semantics is a fairly
natural generalization:

    (apply ... ARGS)

is equivalent to

    (funcall ... ,@ARGS)

so when `...` is empty it means that

    (apply ARGS)

should be equivalent to

    (funcall ,@ARGS)
aka
    (apply (car ARGS) (cdr ARGS))

When ARGS is the empty list we should probably signal an error (just
like (apply (car ARGS) (cdr ARGS)) would, BTW).


        Stefan





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.