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: Sun, 09 Mar 2008 23:37:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> (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, ...).

> 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?


        Stefan




reply via email to

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