From: Alan Mackenzie <acm@muc.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 53227@debbugs.gnu.org, Robert Pluim <rpluim@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#53227: master: Wrong error message with M-: (funcall).
Date: Thu, 13 Jan 2022 18:24:30 +0000 [thread overview]
Message-ID: <YeBuXpMYuIAcRo6P@ACM> (raw)
In-Reply-To: <87mtk0ugjn.fsf@gnus.org>
Hello, Lars.
On Thu, Jan 13, 2022 at 10:32:44 +0100, Lars Ingebrigtsen wrote:
> Robert Pluim <rpluim@gmail.com> writes:
> > Itʼs not Ffuncall's responsibility to check that, itʼs 'eval' that
> > should be doing it. Compare with eg M-: (format), which correctly
> > signals 'wrong-number-of-arguments.
> Or rather macroexpand-all:
> (macroexpand-all '(format))
> => (format)
> (macroexpand-all '(funcall))
> => (funcall nil)
Yes, it is the macro expansion causing the problem, thanks.
The following fixes it (or, at least, "fixes" it; I'm not clear exactly
what the pcase--dontcare clause is there for).
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 663856a8fb..eb5af9ece6 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -441,8 +373,9 @@ macroexp--expand-all
(macroexp--all-forms args)
form)
(macroexp--expand-all newform))))
-
- (`(funcall . ,(or `(,exp . ,args) pcase--dontcare))
+ (`(funcall)
+ form)
+ (`(funcall . (,exp . ,args))
(let ((eexp (macroexp--expand-all exp))
(eargs (macroexp--all-forms args)))
;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
> Perhaps Stefan has some insights into this; added to the CCs.
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
--
Alan Mackenzie (Nuremberg, Germany).
prev parent reply other threads:[~2022-01-13 18:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 7:39 bug#53227: master: Wrong error message with M-: (funcall) Alan Mackenzie
2022-01-13 9:13 ` Robert Pluim
2022-01-13 9:32 ` Lars Ingebrigtsen
2022-01-13 10:55 ` Andreas Schwab
2022-01-13 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-13 15:37 ` Andreas Schwab
2022-01-13 20:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-13 21:27 ` Andreas Schwab
2022-01-13 23:52 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-14 0:04 ` Andreas Schwab
2022-01-14 0:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-14 0:17 ` Andreas Schwab
2022-01-14 0:19 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-14 9:55 ` Andreas Schwab
2022-01-14 17:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-14 7:36 ` Lars Ingebrigtsen
2022-01-14 17:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-13 18:24 ` Alan Mackenzie [this message]
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=YeBuXpMYuIAcRo6P@ACM \
--to=acm@muc.de \
--cc=53227@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=rpluim@gmail.com \
/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).