[Top][All Lists]
[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 14:40:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>>>> "Richard" == Richard Stallman <address@hidden> writes:
>> AFAICS, such an approach would make deselection much less likely to work
>> consistently: the way it's _supposed_ to work is that any pretty much
>> any command except for the special shifted versions should cause
>> deactivation -- and in emacs that's pretty much _every command_.
>> 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?
> Do they matter?
> Ordinary Emacs cursor motion commands such as C-f should not normally
> deactivate the mark. That would be a painfully incompatible change.
The part of the discussion you clipped said:
>>> (defun activate-on-shift-selecting-movement ()
>>> (if (this-command-keys-are-shifted-p)
>>> (progn
>>> (setq shift-selecting-movement t)
>>> (unless mark-active (set-mark)))
>>> (when shift-selecting-movement
>>> (setq shift-selecting-movement nil)
>>> (when mark-active (deactivate-mark)))))
>>>
>>> and then call it from wherever it's considered useful
>>> (e.g. forward-char, next-line, ...).
so cursor motion commands such as C-f would still not normally
deactivate the mark, except when the mark was activated by
a shifted key. This is the desired behavior. CUA implements it, and
pc-select was "recently" changed to do the same.
Stefan
- Re: Shift-movement selection, (continued)
- Re: Shift-movement selection, Kim F. Storm, 2008/03/12
- Re: Shift-movement selection, Thomas Lord, 2008/03/12
- Re: Shift-movement selection, Richard Stallman, 2008/03/12
- Re: Shift-movement selection, Thomas Lord, 2008/03/12
- Re: Shift-movement selection, Richard Stallman, 2008/03/12
- Re: Shift-movement selection, Thomas Lord, 2008/03/12
- Re: Shift-movement selection, Miles Bader, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/10
- Re: Shift-movement selection,
Stefan Monnier <=
- Re: Shift-movement selection, Richard Stallman, 2008/03/11
- Re: Shift-movement selection, Lennart Borgman (gmail), 2008/03/11
- Re: Shift-movement selection, Richard Stallman, 2008/03/12
- Re: Shift-movement selection, Alan Mackenzie, 2008/03/11
- Re: position on changing defaults?, Stefan Monnier, 2008/03/06
- Re: position on changing defaults?, Miles Bader, 2008/03/06
- Re: position on changing defaults?, Richard Stallman, 2008/03/08
- Re: position on changing defaults?, Richard Stallman, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Kim F. Storm, 2008/03/08