emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: Juri Linkov
Subject: Re: Shift selection using interactive spec
Date: Sat, 29 Mar 2008 02:54:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

> The hard part is to figure out a good design for it.
>
> It is important to support both returning a single value and returning
> a list of values.  There could be a character at the beginning of the
> interactive output string which specifies that it's a list of values.
> Otherwise it is one value.
>
> But what do we use after that?
>
> It could be a format string to format the values.
> Is that general enough?
>
> And what about using Lisp code for how to format the value?
> How would that Lisp code refer to the value itself?
> Perhaps that Lisp code should take the form of a lambda expression.
>
> But how do we specify whether it wants a list of values or a single
> value?  I don't see any clean and natural way to specify that.

As I understand the purpose of this feature is practically to move
the last expression of the command's body that usually is written as

    (if (interactive-p)
        (message "Result of this command is %.0f" return-value)
      (format "%.0f" return-value))

to the second argument of `interactive'?

If so, then I see no way to generalize this expression as it can be
anything allowed in Lisp.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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