[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clearing keybindings when redefining a minor mode map
From: |
Stefan Monnier |
Subject: |
Re: Clearing keybindings when redefining a minor mode map |
Date: |
Mon, 27 Dec 2010 21:57:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Suppose I have a keybinding that is shared by two minor modes (mode A
> and mode B). I want to accomplish the following: if both modes A and B are
> active, then the keybinding should only invoke mode A's command.
Then you need to make sure that mode A's keymap appears before mode B's
in minor-mode-map-alist. You might be able to do that by loading mode
B first, or else by adding a check somewhere to see which one's first
and reorder them when needed.
Stefan