From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 53227@debbugs.gnu.org, acm@muc.de, larsi@gnus.org, rpluim@gmail.com
Subject: bug#53227: master: Wrong error message with M-: (funcall).
Date: Thu, 13 Jan 2022 15:37:10 -0500 [thread overview]
Message-ID: <jwvczkvtmud.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87fspr4pga.fsf@igel.home> (Andreas Schwab's message of "Thu, 13 Jan 2022 16:37:09 +0100")
Andreas Schwab [2022-01-13 16:37:09] wrote:
> On Jan 13 2022, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss
> army knife of text editors" wrote:
>>> Same as bug #46636.
>> Actually, it's a different bug, tho its origin might be the same commit.
> It's coming from the same funcall rewrite rule.
I see you agree ;-)
The patch should hopefully fix both cases, tho as you can see the two
cases are fixed separately (which is what I mean by them being two
different bugs).
Stefan
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index b44917f7d56..33ce55a3de8 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -366,14 +366,18 @@ macroexp--expand-all
form)
(macroexp--expand-all newform))))
- (`(funcall . ,(or `(,exp . ,args) pcase--dontcare))
+ (`(funcall ,exp . ,args)
(let ((eexp (macroexp--expand-all exp))
(eargs (macroexp--all-forms args)))
;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
;; has a compiler-macro, or to unfold it.
(pcase eexp
- (`#',f (macroexp--expand-all `(,f . ,eargs)))
+ ((and `#',f
+ (guard (not (or (special-form-p f) (macrop f)))));; bug#46636
+ (macroexp--expand-all `(,f . ,eargs)))
(_ `(funcall ,eexp . ,eargs)))))
+ (`(funcall . ,_) form) ;bug#53227
+
(`(,func . ,_)
(let ((handler (function-get func 'compiler-macro))
(funargs (function-get func 'funarg-positions)))
next prev parent reply other threads:[~2022-01-13 20:37 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvczkvtmud.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=53227@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=rpluim@gmail.com \
--cc=schwab@linux-m68k.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.