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: Stefan Monnier
Subject: Re: Shift selection using interactive spec
Date: Tue, 18 Mar 2008 17:42:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> Suppose we have an external package that defines the motion commands
> forward-section and backward-section, which move point forward and
> backward by mode-specific amount.  (It might, for example, be rebound
> to M-right or M-left.)

> In shift selection mode, the first unshifted motion command must
> deactivate the mark.  This is the expected behavior.

> Now suppose we make the motion commands responsible for deactivating
> the mark; for example, by adding an interactive spec code that calls a
> function `handle-shift-selection' that checks if the calling key
> sequence was shifted, and deactivates the mark if it was not.  If we
> start to define a shift-selected region using a shifted forward-char
> command, and follow this with an unshifted forward-section command,
> the region won't get deactivated.  Instead, it will extend the region.

Oh, that.  It's a pretty minor bug in my opinion.
And those commands have another bug anyway: using shift with them
doesn't select the region.

> To fix this bug, we would have to change the external package.

Yup.  We have to fix it anyway in order for the shift to start the selection.


        Stefan




reply via email to

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