[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shift selection using interactive spec
From: |
Stefan Monnier |
Subject: |
Re: Shift selection using interactive spec |
Date: |
Sat, 15 Mar 2008 16:52:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> 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.
>>
>> Yes, that part is fine.
>>
>>> 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 ...).
>>
>> No, the `if' test should be done inside the function.
> What is the rationale for this? It seems clear that
Calling the function just means "I'm a movement command and would like
to follow the new select-on-shift behavior".
Then the function can decide on what actually happens when.
> "Extend the temporary region highlighting for the next command"
> is a neater and more self-contained task for a function than
> "Extend the temporary region highlighting for the next command, but
> only if this-single-command-shift-translated is non-nil; otherwise,
> do nothing"
The docstring of the function would be more like
"Handle the mark selection for movement commands."
-- Stefan
- 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/14
- 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 <=
- 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, 2008/03/15
- 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