Go to the first, previous, next, last section, table of contents.

Minor Mode Keymaps

For authors of minor modes, who need to rebind one or more keys while in the minor mode. You can do this by hiding the old binding in a variable, and then restore the binding when you leave the mode. Unfortunately, this will usually not work if more than one minor mode try to rebind the key. You can solve this problem, by using the following functions to bind keys in minor modes. See the documentation string for the individual functions for details.

Put in (require 'min-map) in the start of the file containing your minor mode.

Use minor-set-key to set a key in the minor keymap for a given minor mode.

Use minor-call-shadow to call the key binding shadowed by a given minor mode.

Use unbind-minor-mode to remove all key definitions for a given minor mode.


Go to the first, previous, next, last section, table of contents.