[Top][All Lists]

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


From: Stefan Monnier
Subject: bug#3984:
Date: Tue, 17 Sep 2013 21:46:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>>> We have "ad-is-advised" which we can use to find which stack frames
>>> correspond to advised functions. We have "ad-get-orig-definition" which we
>>> can use to find the original definition of an advised function.
>> These are functions of advice.el, which is on the way out.  We need to
>> look at nadvice.el.
> Wait, so defadvice and friends are going away entirely?

It's very widely used, so it'll be around for a long while.  It's not
even marked obsolete officially yet.  But it is functionally obsoleted
by nadvice.

> Is everything in advice.el going away, or are some parts of it going
> to be converted to the new advice system?

It's already been changed to work on top of nadvice.el.

> Is all this documented somewhere?

No, only the internals were changed, and they're usually not documented,
other than in the form of actual code, and a few comments when you're lucky.

> I tried the before advice, and it doesn't seem to work. With the following
> code in emacs -Q:
> (advice-add 'call-interactively :before #'ignore)
> (defun myfun2 ()
>   (interactive)
>   (or (called-interactively-p)
>       (error "Must be interactive!")))
> (call-interactively 'myfun2)
> I get the following stack trace:

Hmm, indeed, that fails already.  It shouldn't be too hard to make
it work, tho.


reply via email to

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