I am writing some extension features for various major modes. The features are (as usual in Emacs) some functions that should be bound to some keys to simplify the workflow of the user.
I started out by assigning these functions to function-keys F1, F2, F3, and so on.. But realized later that if these extensions should be used by others than myself, it would not be a very good idea. According to Appendix D.2 Key Binding Conventions in the Emacs Lisp manual, the function-keys should not be touched; they should be free for the user to customize.
So which keybindings should be assigned for extension features for a major mode?
Are there any guidelines for this? Consider for example cperl-mode
or LaTeX-mode
, they define most keys on the mode-specific-map
i.e. the C-c prefix key. Is it a good idea to use the same keymap, or is this also going to breakdown sometimes in the future when the author of the major mode changes the bindings or adds new bindings to this map? I guess there could also very well be a chance that this keymap (mode-specific-map
) would at some point get exhausted for reasonable/sensible key combinations.. Should I instead use another prefix key? And then, which is safe/good to use? What is common practice?
ctl-d-map
, or my tree-view modectl-z-map
.