emacs-devel
[Top][All Lists]
Advanced

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

Re: Shift selection using interactive spec


From: Chong Yidong
Subject: Re: Shift selection using interactive spec
Date: Tue, 18 Mar 2008 10:45:51 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> If the user runs any other command, it is supposed to deactivate the
>> mark/unhighlight the region.
>
> Maybe for most commands, but maybe not all.  If all(most) non-shifted
> movement commands turn it off explicitly (as I suggested above), and
> given that all buffer modifications already turn it off, there isn't
> much left and those left may actually be better off *not* turning the
> selection off.
>
> I first want to try this, and only if it causes actual problems will
> I want to try something else.  The "only" form is too fleeting and tends
> to disappear for the tiniest reasons.  I prefer a region that
> occasionally stays ON when we don't want it than one where you feel like
> it might disappear from under you at any time.

After playing around with an implementation of this, I feel that it is
very problematic.

The trouble with using handle-shift-selection to explicitly
unhighlight the region is that every single motion command needs to
call handle-shift-selection, by adding the ^ interactive spec.  For
every motion comman (or command that moves point in addition to
something else), there will be a bug: the shift-selected region won't
be highlighted.  This therefore breaks backward compatibility with all
external packages that define their own motion commands.

I think it's better to stick to the implementation in my last patch,
and change those commands for which we don't want to deactivate
transient mark `only' mode.  It's just a matter of making them set
`identity' back to `only'.




reply via email to

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