[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how-many/count-matches for non-interactive use
From: |
Stefan |
Subject: |
Re: how-many/count-matches for non-interactive use |
Date: |
Fri, 15 Oct 2004 08:54:31 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) |
> interactive-p is the wrong function to call here, because it is nil
> when the command is called froma keyboard macro. The right thing
> to do here is to take an argument saying whether to print the message,
> and use "p" in the interactive spec to set that argument non-nil
> in an interactive call.
Silly me, I never thought of abusing `p' for this purpose.
I always thought (why isn't there a letter for "always t") and the used
(interactive (list t)).
> It seems that interactive-p as currently defined is very rarely useful
> -- perhaps never. 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. I've already been bitten once where I just "reorganized"
a function by moving a large subpart into its own function without noticing
that that subpart used `interactive-p'.
Stefan
Re: how-many/count-matches for non-interactive use,
Stefan <=
- Re: how-many/count-matches for non-interactive use, Richard Stallman, 2004/10/16
- Re: how-many/count-matches for non-interactive use, Stefan Monnier, 2004/10/16
- Re: how-many/count-matches for non-interactive use, Kim F. Storm, 2004/10/16
- Re: how-many/count-matches for non-interactive use, Stefan Monnier, 2004/10/17
- Re: how-many/count-matches for non-interactive use, Luc Teirlinck, 2004/10/17
- Re: how-many/count-matches for non-interactive use, Stefan Monnier, 2004/10/17
- Re: how-many/count-matches for non-interactive use, Kim F. Storm, 2004/10/18
- Re: how-many/count-matches for non-interactive use, Richard Stallman, 2004/10/18
- Re: how-many/count-matches for non-interactive use, Luc Teirlinck, 2004/10/18
- Re: how-many/count-matches for non-interactive use, Luc Teirlinck, 2004/10/18