emacs-devel
[Top][All Lists]
Advanced

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

Re: propose adding Icicles to Emacs


From: Richard Stallman
Subject: Re: propose adding Icicles to Emacs
Date: Tue, 03 Jul 2007 00:24:00 -0400

    Your approach makes each command definition that uses "!" in the interactive
    spec deal with the list (collective) and non-list (individual) cases
    together, in a conditional in its body.

That's the purpose of `!': so you can distinguish those two cases.
If you don't want to distinguish them, then you don't write `!'.
Then the command gets called once for each argument.

I think it is a simple feature that makes it possible to implement,
in a clean way, all the multi-command features that we have discussed.

    This still assumes your automatic treatment of multicommands via
    `call-interactively'.

Exactly.  That's a better method.

I think it is a simple feature that makes it possible to implement,
in a clean way, all the multi-command features that we have discussed.

                          The way I do it now separates each of the action
    functions (the action "implementations", in your terms) from the command
    definition itself:

    (defun command ()
      (interactive)
      (let ((candidate-action-fn 'action-one)
            (all-candidates-action-fn 'action-all))
         (action-one (read-file-name "File: "))))

That's why my method is better.

(Note that this example reads a minibuffer argument inside the body of
the command, contrary to Emacs convention, which says you should read
them inside `interactive'.)




reply via email to

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