GNU bug report logs -
#3984
23.0.96; defadvice of call-interactively defeats interactive-p
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Thu, 30 Jul 2009 22:45:04 UTC
Severity: minor
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #93 received at 3984 <at> debbugs.gnu.org (full text, mbox):
>>> 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.
Stefan
This bug report was last modified 11 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.