emacs-devel
[Top][All Lists]
Advanced

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

Re: deactivation in "shift-select" mode


From: Chong Yidong
Subject: Re: deactivation in "shift-select" mode
Date: Fri, 07 Mar 2008 21:22:55 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux)

Miles Bader <address@hidden> writes:

> Johan Bockgård pointed out (on the #emacs irc channel) that
> transient-mark-mode actually _already_ has enough functionality to
> allow implementing the desired "deactivation" behavior for
> shift-select (where non-shifted movement keys automatically deactivate
> any mark which was activated by shifted movement keys), without using
> post-command-hook at all!
>
> Basically his idea is to use the "only mode" feature of
> transient-mark-mode (setting the transient-mark-mode variable to 'only
> instead of t).
>
> I've attached a proof-of-concept that shows how it works; this code
> only implements shift-select for the basic cursor movement keys plus
> forward/backward-word, but it's obviously trivial to extend to any
> other commands desired.

Bit confused.

AFAICT, the function region-active-p which you use isn't defined, and
the "only mode" feature transient-mark-mode doesn't exist/isn't
documented.  Is this a feature from XEmacs?




reply via email to

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