emacs-devel
[Top][All Lists]
Advanced

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

Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10


From: Stefan Monnier
Subject: Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500)
Date: Fri, 16 Nov 2012 09:16:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>>> Unfortunately called-interactively-p never returns non-nil while
>>> performing an advised command interactively.
>> Yes, called-interactively-p (and interactivep, of course) are pretty
>> sensitive beasts.  The problem you mention was already present before,
>> tho it probably got a bit worse (it used to "only" affect uses of
>> called-interactively-p in the advised command, whereas it now also
>> affects uses in the advice themselves).
> Ok.  It seems hard to me to fix, so I will live with this way
> (for a while?).

I have some preliminary code to try and fix it, but it only works in
some cases.  `called-interactively-p' is also broken in some
lexical-binding cases (e.g. using called-interactively-p within
a `condition-case' or a `catch').

It is a functionality that is fundamentally problematic.  E.g. (to
revisit a recent claim that funcall+lambda should be identical to let)
if called-interactively-p returns t in
(let ((foo bar)) (called-interactively-p)), should it also return t in
(funcall (lambda (foo) (called-interactively-p)) bar) ?

But if you can point me to concrete examples that need to work (and/or
that used to work), it would be very helpful.


        Stefan



reply via email to

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