emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift-movement selection


From: Stefan Monnier
Subject: Re: Shift-movement selection
Date: Mon, 10 Mar 2008 12:23:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>>>> So to make it work "correctly", you need to modify all commands in
>>>>> emacs!  [yikes!]
>>>> Most commands already deactivate the mark.  So which ones would be left?
>> 
>>> Anything that doesn't modify the buffer -- e.g. all movement commands.
>> 
>> Supposedly these will be changed to use the new function, so they will
>> explicitly deactivate the mark if the mark was activated with shift and
>> the movement is then performed without the shift.

> One problem is that basic movement commands are in C, not in Lisp.

Doesn't look like a problem to me.

> Another problem may be advise on functions - the "shift" handling
> may then be performed too late.

The way I see it, the (un)shift handling would be done in the
`interactive' spec of those commands.  Would that be too late?
In which circumstance?

> Personally, I like my proposal of just setting a "shift" property
> on the relevant commands, and do it by running a shifted-key-hook
> in the command loop.

This suffers from the same problems as pre/post-command-hook.

> That method has proven to work excellent with CUA mode!

I know that pre/post-command-hook work just fine for lots of things,
which is why they're provided.  But it's better to avoid them for core
functionality such as the functionality enabled by default.


        Stefan




reply via email to

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