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: Mon, 17 Mar 2008 17:10:10 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Nevertheless, regardless of the exact details, shift-selection will
>> have to end up setting transient-mark-mode to a non-nil value.
>
> Indeed.  I just saw that Miles and Kim were talking about moving the
> handling of "only" to deactivate-mark, or something along those lines.
>
> I plead guilty to turning transient-mark-mode into a non-boolean
> variable, and would be happy to see it go back to being boolean.

If we're willing to ignore backward compatibility, I think a good way
to clean this up as follows:

 - make transient-mark-mode a boolean again

 - give mark-active a couple new possible values:

    nil == same as now

    t == mark active but no highlighting

    `highlight' == mark active, highlight the region

    `highlight-until-deactivated' == temporary TMM (like `lambda')

 - change every relevant place in the code (including a couple of
   spots in xdisp.c).  For example,

     (and transient-mark-mode mark-active)

   would become

     (memq mark-active '(highlight highlight-until-deactivated))

WDYT?

> The way I see it "only-TTM" is a more brittle and less used&tested
> implementation than "temporary-TTM", so everything else being equal
> I prefer "temporary-TTM".  In this case I'm not convinced the difference
> matters, so I prefer "temporary-TTM".

I don't feel strongly about this, so OK.  AFAICT, it's simply a matter
of using `lambda' instead of `only', and some extra code in
handle-shift-selection.

> maybe mouse-selection should use "temporary-TTM" as well (and be
> deactivated by unshifted movement)?  Then we could get rid of
> "only-TTM" altogether.

Might be workable, might not.  I'll think about it.




reply via email to

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