GNU bug report logs -
#11747
24.1.50; called-interactively-p vs. advice
Previous Next
Full log
Message #11 received at 11747 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> > `called-interactively-p' returns wrong values when called inside
> > commands that are adviced.
>
> Old "interactive-p" had the same issue, though maybe that mattered less.
> It's to do with the way advice is implemented. It actually goes out of
> its way to avoid using call-interactively unless it has to (subrs).
> See comments in advice.el header.
So, do you mean this can't be fixed? Too bad, but ok, that's what I
thought.
But then, we IMHO should improve the docstring of `called-interactively':
1. This sentence:
This function is meant for implementing advice and other
function-modifying features.
Is there a "not" missing?
2. Explicitly say that `called-interactively' will not work when used
in an adviced function.
This is something completely different than 1. 1. is about implementing
advice via `called-interactively'. 2. says that if you advice any
function that already uses it, it will stop working.
So, my wish is to improve the docstring of `called-interactively' a bit.
Then, this report can be closed.
Michael.
This bug report was last modified 8 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.