Given an emacs mode, how to find its keymap name?
What I do is C-u M-x apro-var RET isearch 开发者_JAVA技巧mode-map RET
if I want to find out the name of the keymap for the isearch mode.
Is there other ways?
Sure, look at the source code:
M-x find-library RET isearch RET
C-s mode-map
This is probably more reliable because people may not name their keymaps as you might hope, and some modes have more than one keymap (resulting in naming that your search may not find). A good example of needing to look at the code is 'viper-mode
which has several different keymaps which are active under different situations.
Note: if you don't know the library name, replace find-library
with find-function
.
精彩评论