From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 69533@debbugs.gnu.org
Subject: bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax
Date: Mon, 04 Mar 2024 02:51:42 +0100 [thread overview]
Message-ID: <8734t6n4r5.fsf@web.de> (raw)
Hello,
C-h f apply says:
| ...
| With a single argument, call the argument's first element using the
| other elements as args.
Issue 1: This doc sentence has to be moved after the following example,
because that example:
| Thus, (apply '+ 1 2 '(3 4)) returns 10.
is an example for the more widespread syntax.
That sentence actually explains a special case: it tells that this is
also allowed:
(apply '(+ 1 2)) ==> 3
Issue 2: The byte compiler currently miscompiles such expressions:
Expected:
(funcall (lambda () (apply '(+ 1 2)))) ==> 3
but
(funcall (byte-compile '(lambda () (apply '(+ 1 2)))))
~~> Error: Invalid function: (+ 1 2)
AFAIU this is `byte-optimize-apply's fault:
(byte-optimize-apply '(apply '(+ 1 2)))
==> (funcall '(+ 1 2) '+ '1 '2) ; Ouch!
TIA,
Michael.
next reply other threads:[~2024-03-04 1:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 1:51 Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-03-04 3:39 ` bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax Drew Adams
2024-03-04 4:40 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04 15:52 ` Drew Adams
2024-03-04 5:13 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04 7:46 ` Basil L. Contovounesios
2024-03-04 8:10 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04 8:47 ` Basil L. Contovounesios
2024-03-04 8:17 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04 8:48 ` Basil L. Contovounesios
2024-03-04 9:39 ` Andreas Schwab
2024-03-04 12:52 ` Basil L. Contovounesios
2024-03-04 13:13 ` Mattias Engdegård
2024-03-04 13:25 ` Mattias Engdegård
2024-03-04 21:12 ` Drew Adams
2024-03-14 7:52 ` Eli Zaretskii
2024-03-14 8:44 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-14 11:13 ` Eli Zaretskii
2024-03-14 11:18 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734t6n4r5.fsf@web.de \
--to=bug-gnu-emacs@gnu.org \
--cc=69533@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).