From: Noam Postavsky <npostavs@users.sourceforge.net>
To: 19704@debbugs.gnu.org
Cc: Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#19704: 25.0.50; funcall with hard-quote inside cl-labels uses the local function binding
Date: Thu, 9 Jun 2016 22:37:37 -0400 [thread overview]
Message-ID: <CAM-tV-9jBTmYXLD7N_UiwtbjNvWaW-fcX4W-yHcXsvsJA2jkbA@mail.gmail.com> (raw)
In-Reply-To: <86twzc8czn.fsf@yandex.ru>
tag 19704 + patch
found 19704 25.0.94
quit
Seems that macroexp--expand-all got too aggressive, patch below
teaches it to back off in case of locally defined functions:
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index ed4d6e4..ce5d5dc 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -261,9 +261,14 @@ macroexp--expand-all
(format "%s quoted with ' rather than with #'"
(list 'lambda (nth 1 f) '...))
(macroexp--expand-all `(,fun ,arg1 ,f . ,args))))
- (`(funcall (,(or 'quote 'function) ,(and f (pred symbolp)) . ,_) . ,args)
- ;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
- ;; has a compiler-macro.
+ ;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
+ ;; has a compiler-macro.
+ (`(funcall (,(or 'quote 'function)
+ ,(and f (pred symbolp)
+ ;; Unless `foo' is a locally bound macro.
+ (guard (not (assq f macroexpand-all-environment))))
+ . ,_)
+ . ,args)
(macroexp--expand-all `(,f . ,args)))
(`(,func . ,_)
;; Macro expand compiler macros. This cannot be delayed to
next prev parent reply other threads:[~2016-06-10 2:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 15:22 bug#19704: 25.0.50; funcall with hard-quote inside cl-labels uses the local function binding Dmitry Gutov
2016-06-10 2:37 ` Noam Postavsky [this message]
2016-06-10 22:06 ` Dmitry Gutov
2016-06-11 2:42 ` Stefan Monnier
2016-06-11 2:56 ` Noam Postavsky
2016-06-11 21:38 ` Stefan Monnier
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=CAM-tV-9jBTmYXLD7N_UiwtbjNvWaW-fcX4W-yHcXsvsJA2jkbA@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=19704@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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).