emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: CUA property not set for multiple functions


From: Kim F. Storm
Subject: Re: CUA property not set for multiple functions
Date: Tue, 27 Sep 2005 12:09:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> You may argue that if a user binds one of the other commands that may
>>> be regarded as a CUA movement command to a single key, CUA will not
>>> work for that key -- which is true, but then the user will have to add
>>> the necessary CUA property too.  I don't want to "pollude" the sources
>>> with properties that are only needed in theory.  But if you know of
>>> some specific commands where it may be relevant, pls. tell me and I
>>> will consider them case by case.
>
> Can't it be done 99% automatically, rather than with a symbol property?
> E.g. use pre-command-hook to remember the buffer-before and tick-before; in
> post-command-hook check whether the current buffer is still the same and
> whether the tick count has changed and whether the command was bound to
> a single key.

This is a really good suggestion -- I'll think about it.

The main problem is that I need to set the mark _before_ the command
if not already set.  But it may just as well work to remember where
point was before the command and set the mark _after_ executing the
command.  Must be careful with commands which sets deactivate-mark
and there are probably other glitches...

>
> IIUC this is only actually used when the key was used with an additional
> shift modifier (whereas the binding itself is to a non-shifted key) and it's
> only used to mark&activate the region, so false positives are not too
> harmful, right?

True -- and for a few specific cases, the CUA property may be used
to inhibit the marking for specific commands.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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