unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: 24.4.50; called-interactively-p and skip advice:
       [not found] <87a97texjg.fsf@gmail.com>
@ 2014-08-01 16:12 ` raman
  0 siblings, 0 replies; only message in thread
From: raman @ 2014-08-01 16:12 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: tv.raman.tv, emacs-devel

Following up on this  bug with additional info:

I just confirmed that this bug was not present in emacs 24.3 --- where
interactive-p was implemented in C -- that function was declared
obsolete in 23.2.

In 24.4 when we transitioned to nadvice.el is when this appears to have
broken.

Looking at the code in 24.4;

the code for called-interactively-p  and its subsequent call through to 
advice--called-interactively-skip  --- one of the functions placed on
called-interactively-p-functions -- appears to introduce   large level
of complexity. advice--called-interactively-skip is defined in
nadvice.el 

Going back to the specific issue from the Emacspeak side:

What I really need is a way to tell if an interactive command was called
by the user pressing a key e.g. M-f for forward-word -- or M-x
forward-word -- those are the only situations in which the emacspeak
advice that speaks the "current word" should be invoked.  

Using (called-interactively-p 'interactive) for this use-case now that I
look at what that code does feels extremely tangled.

Could we perhaps introduce a C-level variable  -- say "interactivep"
that is exposed to elisp --  code in callint.c could set that variable
appropriately and clear it upon completing command execution. 

At the time nadvice.el was introduced, Stefane had me check through with
emacspeak to make sure that nothing broke -- and I had confirmed it --
admittedly, the current breakage in ruby-mode is caused by a large
number of complex recursive calls that are happening within that mode.

Note that there is only one emacspeak advice invoked even then -- the
one to backward-sexp -- but  the call stack is deep enough that
called-interactively-p gets very confused.

--Raman 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-01 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87a97texjg.fsf@gmail.com>
2014-08-01 16:12 ` 24.4.50; called-interactively-p and skip advice: raman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).