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: Sat, 29 Aug 2009 17:54:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> I object.  Two different names makes it easier to remember the
> difference.  An argument would be harder to remember.

I disagree completely: it's a lot easier to notice that the function you
use accepts an argument than to notice that there's another function
outthere doing something similar yet different.  Especially if you use
eldoc-mode, of course.

> The name `called-interactively-p' is good because
> it relates to the use of `interactive'.  The name `interactive-p'
> is confusing because it does NOT relate.

I don't care much which one is kept, but I'd like to remove one of
the two.  `interactive-p' has the advantage that it existed for a *very*
long time, whereas called-interactively-p is a new comer.  So even if we
obsolete interactive-p now, it'll take many many years before we can
actually remove it, whereas called-interactively-p is still almost
unused outside of Emacs's bundled packages.

> 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.  So I'd
rather not add yet more functions to support this hack (if you look at
the implementation of `interactive_p' it's clear that it's a nasty
hack).


        Stefan




reply via email to

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