[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shift selection using interactive spec
From: |
Kim F. Storm |
Subject: |
Re: Shift selection using interactive spec |
Date: |
Sat, 15 Mar 2008 18:16:52 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> Stefan Monnier <address@hidden> writes:
>
>>> So we define (i) an elisp function called, say,
>>> shift-translation-handler, and (ii) a new interactive code that says
>>> to call shift-translation-handler when a command is activated through
>>> a shift translated keybinding.
>>
>> No: the function is called every time. *All* the work is done by the
>> elisp function.
>
> I think it would be more elegant to split this up into two pieces: a
> variable this-single-command-shift-translated that says whether shift
> translation occurred, and a function shift-translation-handler that
> temporarily sets transient mark mode. Both would be available to
> elisp programs.
>
> The new interactive spec code ^ would then call
> shift-translation-handler if this-single-command-shift-translated is
> non-nil, but elisp programs could accomplish this just as easily via
> (if this-single-command-shift-translated ...).
>
> This could also make it easier to handle the possibility that certain
> commands might want to accomodate shift selection, but need to handle
> it differently than the default.
I like this approach.
Now, before you settle on a solution, maybe you should also consider
how to handle the delete-selection-mode in a sensible way without
using the current pre-command-hook + command property approach.
Of course, since shift-select is promoted to a standard feature by
modifying the relevant commands, we can just take the same approach
with delete-selection-mode, i.e. modify the relevant commands to
simply honour delsel mode.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: Shift selection using interactive spec, (continued)
- Re: Shift selection using interactive spec, Stefan Monnier, 2008/03/14
- Re: Shift selection using interactive spec, Chong Yidong, 2008/03/15
- Re: Shift selection using interactive spec, Stefan Monnier, 2008/03/15
- Re: Shift selection using interactive spec, Chong Yidong, 2008/03/15
- Re: Shift selection using interactive spec, Stefan Monnier, 2008/03/15
- Re: Shift selection using interactive spec, Thomas Lord, 2008/03/15
- Re: Shift selection using interactive spec, Chong Yidong, 2008/03/16
- Re: Shift selection using interactive spec, Lennart Borgman (gmail), 2008/03/16
- shift-select harmony, Thomas Lord, 2008/03/15
- Re: shift-select harmony, Thomas Lord, 2008/03/15
- Re: Shift selection using interactive spec,
Kim F. Storm <=
- Re: Shift selection using interactive spec, Thomas Lord, 2008/03/15
- Re: Shift selection using interactive spec, Alan Mackenzie, 2008/03/16
- Re: Shift selection using interactive spec, Thomas Lord, 2008/03/15
- Re: Shift selection using interactive spec, Chong Yidong, 2008/03/15
- Re: Shift selection using interactive spec, Thomas Lord, 2008/03/15
- Re: Shift selection using interactive spec, Mathias Dahl, 2008/03/16
- Re: Shift selection using interactive spec, Chong Yidong, 2008/03/16
- Re: Shift selection using interactive spec, Thomas Lord, 2008/03/16
- Dear lazyweb (Re: Shift selection using interactive spec), Thomas Lord, 2008/03/16
- Re: Shift selection using interactive spec, Stefan Monnier, 2008/03/16