[Top][All Lists]

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

Re: Enhancements to "minor-mode-map-alist" functionality.

From: Kim F. Storm
Subject: Re: Enhancements to "minor-mode-map-alist" functionality.
Date: 26 Apr 2002 15:44:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

Richard Stallman <address@hidden> writes:

>     > This should be feasible with existing facilities, right?
>     Yes, except that the condition on this keymap is 
>       (or (eq cua-enable-cua-keys t)
>         cua--last-region-shifted)
> Could you make a new variable to control this keymap,
> and set it from post-command-hook?
> Likewise, maybe you could control the other maps
> with variables set in post-command-hook.
> This would not be much more complicated
> and it probably would be about as fast.
> Perhaps faster, since the hook function could be
> byte-compiled, whereas if these expressions go straight
> into the keymap they would have to be interpreted.

That is exactly what I've done now.
I set a total of 5 such variables in the post-command-hook
to control the various cua related keymaps.

The problem with this approach is that -- in some cases --
a subsequent post-command-hook function or another external
event may change the state [notably clear the mark active state]
so my state variables no longer contain the proper values.

I still belive evalling those expressions when the keymaps are used is
preferable (safer, simpler and more logical) rather than doing it in the

reply via email to

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