emacs-devel
[Top][All Lists]
Advanced

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

Re: interactive-p and called-interactively-p


From: Stephen J. Turnbull
Subject: Re: interactive-p and called-interactively-p
Date: Fri, 04 Sep 2009 10:21:16 +0900

Stefan Monnier writes:

 > So, I'd suggest the following:
 > 
 > - mark interactive-p as obsolete.
 > - add a mandatory argument to called-interactively-p.

I'd slightly prefer to keep interactive-p and give it the mandatory
argument, maybe a list of things to test a la eval-when.  As Richard
points out, "called-interactively-p" means "called by
call-interactively".  If so, adding a mandatory argument means "but
not really...".

I guess you could name the argument something like "filter-out" and
have values like "noninteractive" or "called-from-kbd-macro" for it,
but that seems awkward to me.

 > - mark interactive-p and called-interactively-p as obsolete.
 > - create a new function `invoked-interactively-p' with a mandatory argument.

-1.  That is a poor alternative in so many ways.

 > This said, AFAIK called-interactively-p is not used in any Elisp package
 > other the ones bundled with Emacs,

It's not used in any package in the XEmacs packages tree.  I believe
it may be used in AUCTeX because of this line from a ChangeLog:

auctex-11_84-import/ChangeLog:
        (TeX-doc): Use `interactive-p' instead of `called-interactively-p'

but maybe upstream changed that for XEmacs compatibility.  Some
packages may be years out of date, but most have been synched within
the last couple of years so could have used called-interactively-p.





reply via email to

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