bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3984:


From: Stefan Monnier
Subject: bug#3984:
Date: Wed, 18 Sep 2013 23:38:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> advice.  This is what "advice--called-interactively-skip" does.  (Although
> reading through it I don't see where the bug is that prevents it recognizing
> the before advice in my example.)

Exactly.  I think we need to fix this problem.  It really should work.

> If all advised functions are wrapped by a call to the above function
> "wrap-function-in-indicator-lambda",

All functions advised with a non-:around advice have such
a "recognizable wrapper"; and that's indeed what
advice--called-interactively-skip checks in

          (and (eq (nth 1 frame2) 'apply)
               (progn
                 (funcall get-next-frame)
                 (advice--p (indirect-function (nth 1 frame2)))))

IOW the nadvice.el machinery is itself the recognizable wrapper.
Not sure why this fails in your test case, tho.

For :around advices, the machinery does not provide a recognizable
wrapper, so we might want to add an ad-hoc wrapper like you suggest for
those cases, tho maybe we can avoid the cost of such a wrapper, by
keeping the so-advised inner-functions in a hash-table (so we can still
recognize them, even tho they're not tagged directly in the backtrace).

So, I think the first thing is to figure out why your test case fails.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]