[Top][All Lists]

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

Re: position on changing defaults?

From: Miles Bader
Subject: Re: position on changing defaults?
Date: Thu, 06 Mar 2008 08:46:16 +0900

Juri Linkov <address@hidden> writes:
>>> - selection with Shift-arrow keys
>> I think this would be a good default.  If someone is willing to make a
>> patch that refactors this code from cua-mode into simple.el, it would
>> be worth considering.
> Unfortunately, I see no way of implementing this in simple.el without
> using pre-command-hook and post-command-hook.  It seems this can be
> implemented only in C in the function that reads characters.

I was thinking about we might do this in a better and more general way
(in C, obviously).

How about adding a new type of binding, a "modifier binding", which
could serve to implement CUA movement, and replace the current automatic
S-foo => foo remapping.

Basically, these would be bindings that represent event-modifiers only.
If normal key lookup fails, the keymapping mechanism would then look up
and invoke the modifier binding corresponding to the modifiers on the
key, and invoke it instead; the invoked function could then, if it
wished (e.g. for CUA), set some variables or frob some state and
re-invoke the event with the modifiers removed.

[Presumably there would be some fallback mechanism for dealing with
multiple modifiers where there was no binding for the entire modifier
set; e.g., if the event was "S-M-x", and there was no "S-M-x" binding,
nor a "S-M-" binding, it would then lookup say "S-" and "M-" in turn,
and invoke the first one found.]

Whadaya think?


Bride, n. A woman with a fine prospect of happiness behind her.

reply via email to

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