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: David Kastrup
Subject: Re: Shift selection using interactive spec
Date: Wed, 26 Mar 2008 13:20:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Juri Linkov <address@hidden> writes:

>>> But an interactive code does not work when a spec is a Lisp expression
>>> that is not a string.  So just as an interactive Lisp expression should
>>> call a special function `shift-translation-handler' explicitly,
>>> anonymous functions can call the same function as well (though it is
>>> not recommended to use anonymous functions for commands).  So both these
>>> approaches are on a par in this regard.
>>
>> Which two approaches are you discussing here?
>
> 1. interactive codes
> 2. properties
>
>>> I think that just as `C-h f' describe-function displays information
>>> when the function is advised, we should change `C-h v'
>>> describe-variable to display information about attached variable
>>> properties as well.
>>
>> But we are talking right now about _functions_.  And it is a mistake to
>> consider the property list part of either variable or function: it has
>> different scopes and is independent from both variable or function.
>
> Sorry, I meant a symbol's property list for a function, not for a
> variable.

They are inherently not attached to either.  So it makes no sense to use
them on C-h f.  In particular since C-h k can deliver something like

<mouse-2> (translated from <down-mouse-2> <mouse-2>) at that spot runs the 
command (lambda (event) (interactive "e") (preview-toggle #<overlay from 1367 
to 1387 in circ.tex> (quote toggle) event))
  which is an interactive Lisp function.
(anonymous EVENT)

Not documented.

There is no associated property list here.

> Property lists are already widely used in Emacs, so there is no reason
> to avoid them.  They are integral part of Emacs Lisp, and will cause
> no more problems.

Red herring.  Property lists are an inherent part of Lisp, but as an
element of _symbols_, not functions.

The interactive specifications are made part of _functions_ for a
reason, even though it makes it somewhat harder to extract them
explicitly (using interactive-form).  It is inconsistent to attach stuff
like that to a property-list that is more or less incidentally part of a
symbol that might or might not be the accessor to a function cell.

(call-interactively 'woozle)

currently is equivalent to

(call-interactively (symbol-function 'woozle))

And

(call-interactively last-command)

currently repeats the last action.

If we don't want the interactive call information to be in the
interactive form but in property lists attached to symbols, we need to
formally replace interactive forms completely, not mess the system up on
a case-by-case basis.

-- 
David Kastrup




reply via email to

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