From: Glenn Morris <rgm@gnu.org>
To: Le Wang <l26wang@gmail.com>
Cc: 12610@debbugs.gnu.org
Subject: bug#12610: unable to use macro in defadvice
Date: Thu, 11 Oct 2012 22:05:43 -0400 [thread overview]
Message-ID: <nwzk3s1m2w.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CAM=K+iq-7ijbLg+-mtnKShVhQQFuPORDc5nbUEsqZidgtNNp=A@mail.gmail.com> (Le Wang's message of "Tue, 9 Oct 2012 21:02:58 +0800")
Interesting. Advice does not macroexpand the advice definition.
I guess it should?
*** lisp/emacs-lisp/advice.el 2012-09-14 13:44:31 +0000
--- lisp/emacs-lisp/advice.el 2012-10-12 02:02:39 +0000
***************
*** 3658,3664 ****
(advice (ad-make-advice
name (memq 'protect flags)
(not (memq 'disable flags))
! `(advice lambda ,arglist ,@body)))
(preactivation (if (memq 'preactivate flags)
(ad-preactivate-advice
function advice class position))))
--- 3658,3664 ----
(advice (ad-make-advice
name (memq 'protect flags)
(not (memq 'disable flags))
! `(advice lambda ,arglist ,@(macroexpand-all body))))
(preactivation (if (memq 'preactivate flags)
(ad-preactivate-advice
function advice class position))))
next prev parent reply other threads:[~2012-10-12 2:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 13:02 bug#12610: unable to use macro in defadvice Le Wang
2012-10-12 2:05 ` Glenn Morris [this message]
2012-10-12 3:46 ` Glenn Morris
2012-10-12 13:35 ` Stefan Monnier
2012-10-12 17:54 ` Glenn Morris
2012-10-12 18:15 ` Stefan Monnier
2020-09-13 16:43 ` Lars Ingebrigtsen
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=nwzk3s1m2w.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=12610@debbugs.gnu.org \
--cc=l26wang@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 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.