[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shift-movement selection
From: |
Miles Bader |
Subject: |
Re: Shift-movement selection |
Date: |
Mon, 10 Mar 2008 08:00:35 +0900 |
Stefan Monnier <address@hidden> writes:
> (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!]
The method I showed earlier seems almost as simple, and has the
advantage that it's very unintrusive -- you only need to worry about the
commands which implement the special behavior -- and seems to work
pretty well.
-Miles
--
Brain, n. An apparatus with which we think we think.
- Re: position on changing defaults?, (continued)
- deactivation in "shift-select" mode, Miles Bader, 2008/03/07
- Re: deactivation in "shift-select" mode, Chong Yidong, 2008/03/07
- Re: deactivation in "shift-select" mode, Miles Bader, 2008/03/07
- Re: deactivation in "shift-select" mode, Miles Bader, 2008/03/07
- Re: deactivation in "shift-select" mode, Kim F. Storm, 2008/03/08
- Re: position on changing defaults?, Richard Stallman, 2008/03/09
- Re: position on changing defaults?, Miles Bader, 2008/03/09
- Shift-movement selection (was: position on changing defaults?), Stefan Monnier, 2008/03/09
- Re: Shift-movement selection,
Miles Bader <=
- Re: Shift-movement selection, Kim F. Storm, 2008/03/09
- Re: Shift-movement selection, Miles Bader, 2008/03/09
- Re: Shift-movement selection, Stefan Monnier, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/09
- Re: Shift-movement selection, Miles Bader, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/10
- Re: Shift-movement selection, Kim F. Storm, 2008/03/10
- Re: Shift-movement selection, Stefan Monnier, 2008/03/10
- Re: Shift-movement selection, Lennart Borgman (gmail), 2008/03/10