emacs-devel
[Top][All Lists]
Advanced

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

Re: extra-interactive functions


From: Ted Zlatanov
Subject: Re: extra-interactive functions
Date: Fri, 03 Jun 2011 11:11:14 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Fri, 03 Jun 2011 17:27:45 +0200 martin rudalics <address@hidden> wrote: 

>>>> Also, if `find-file' should be avoided in ELisp generally, the docstring
>>>> should say so, like it does for many other functions.
>> 
mr> Indeed.
>> 
>> But that's tedious to do by hand.  If we tag the function symbol
>> (e.g. `switch-to-buffer') with some extra-interactive property, we can
>> tag all the functions that call it as well at compile time.  Wouldn't
>> that be nicer?  The docstring can then automatically say "unsafe to call
>> because it calls `switch-to-buffer'" which is nice and more helpful.

mr> There are only very few interactive functions that should be allowed to
mr> call `switch-to-buffer'.  `find-file' may fit into this category because
mr> that's what users traditionally expect it to do (although I plan to have
mr> it call a function `pop-to-buffer-same-window' sooner or later).  In the
mr> distant future there should be no function calling `switch-to-buffer' at
mr> all.

Thank you for explaining.

You're sort of side-stepping my suggestion of a special tag for
functions that should not be called from ELisp.  Is it because you think
it's too unusual to be useful, or something else?

Ted




reply via email to

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