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: Stefan Monnier
Subject: Re: interactive-p and called-interactively-p
Date: Mon, 31 Aug 2009 19:56:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>       `interactive-p' has the advantage that it existed for a *very*
>     long time, whereas called-interactively-p is a new comer.

> It has existed only 5 years,

Yes, and during this time, compatibility to Emacs-21 and XEmacs was
still fairly important for unbundled packages, so it hasn't seen much
use outside of Emacs itself.

> but I think the important point is that its name fits its meaning.
> The name interactive-p does not correspond to its meaning, and users
> very often guess wrong about what it does.

This is clearly true, but while confusion has been common, it hasn't
been an actual problem either.  And in any case, as I mentioned, we
should rather encourage programmers to stay avoid from both of
those functions.

>> Perhaps we should make the name `interactive-p' obsolete and make
>> a new name, `from-user-input-p'.  This will eliminate the
>> confusion completely.

>     Even such a new name isn't very clear.  The only clear solution is to
>     use an additional argument passed from the interactive spec.
> In what sense is that the only clear solution?  I do not follow you here.

Because it makes it clear that you're distinguishing different notions
of "interactivity" (one of them being just "called via
call-interactively", the other being "directly called from the keyboard
rather than via a macro or some batch invocation").


        Stefan




reply via email to

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