emacs-devel
[Top][All Lists]
Advanced

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

Re: how-many/count-matches for non-interactive use


From: Kim F. Storm
Subject: Re: how-many/count-matches for non-interactive use
Date: Sun, 17 Oct 2004 00:00:15 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> It seems that interactive-p as currently defined is very rarely useful
>>> -- perhaps never.  

Thinking more about it, I belive that the current behaviour of
interactive-p makes good sense in cases where it is used to determine
whether a command should do sit-for or output a message, as those are
typically not desireable during macro execution.

>>>                       Perhaps we should change interactive-p to ignore
>>> whether the command is running from a macro and do what most people
>>> seem to expect.
>
>>     I think we should declare it obsolete because the alternative (of
>>     adding an argument) is always clearer, less brittle, and allows
>>     callers better control.
>
>> Before we say it is obsolete, we had better see if anyone does really
>> want it.  It would be very good for someone to determine which, if
>> any, of the current uses of interactive-p really want the current
>> behavior of interactive-p.
>
> The current behavior can still be obtained without interactive-p by checking
> executing-macro.  Doing it that way also has the advantage of being much
> more clear.
> I doubt anybody used interactive-p rather than an extra argument just
> because of the subtle difference w.r.t keyboard macros.  I expect 99% of the
> people who used interactive-p haven't even thought about the interaction
> with keyboard macros.

You could just as well do

    (and  (not executing-macro) (interactive-p))

But without checking all current uses, it is hard to say what the right
functionality is.

I won't have time to do that ...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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