From: Tom Tromey <tom@tromey.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 18399@debbugs.gnu.org, tom@tromey.com
Subject: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive
Date: Fri, 05 Sep 2014 23:40:19 -0600 [thread overview]
Message-ID: <87egvp9uik.fsf@tromey.com> (raw)
In-Reply-To: <8738c7oubb.fsf@web.de> (Michael Heerdegen's message of "Fri, 05 Sep 2014 01:11:04 +0200")
Michael> I myself was confused by the fact that :filter-args is the only case of
Michael> all advice types where the advice fun receives the arguments as a list.
Michael> It's a bit surprising, although the doc is clear and there are good
Michael> reasons for that "exception". Maybe we could add a sentence to the
Michael> ‘:filter-args’ paragraph of (info "(elisp) Advice combinators") like
Michael> "Note that FUNCTION is called with only one argument, the list of
Michael> arguments, for this advice type".
Yeah, I had the same thought and had written the appended patch.
My reason was simply that I had been (mis-)reading the :filter-args
text, not the stuff about the (interactive) spec.
Tom
=== modified file 'doc/lispref/functions.texi'
*** doc/lispref/functions.texi 2014-06-02 00:18:22 +0000
--- doc/lispref/functions.texi 2014-09-06 05:40:02 +0000
***************
*** 1480,1485 ****
--- 1480,1488 ----
@example
(lambda (&rest r) (apply @var{oldfun} (funcall @var{function} r)))
@end example
+ Note carefully that, unlike with other combinators, in the
+ @code{:filter-args} case, the original arguments are passed as a
+ single argument to the advising function.
@item :filter-return
Call the old function first and pass the result to @var{function}.
prev parent reply other threads:[~2014-09-06 5:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 20:01 bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Tom Tromey
2014-09-03 20:42 ` Michael Heerdegen
2014-09-03 22:27 ` Tom Tromey
2014-09-04 2:59 ` Stefan Monnier
2014-09-04 13:13 ` Stefan Monnier
2014-09-04 15:44 ` Stefan Monnier
2014-09-04 23:11 ` Michael Heerdegen
2014-09-05 1:24 ` Stefan Monnier
2014-09-05 16:29 ` Michael Heerdegen
2014-09-06 5:40 ` Tom Tromey [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egvp9uik.fsf@tromey.com \
--to=tom@tromey.com \
--cc=18399@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 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.