Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Given an emacs mode, how to find its keymap name?

What I do is C-u M-x apro-var RET isearch mode-map RET if I want to find out the name of the keymap for the isearch mode.

Is there other ways?

like image 299
Yoo Avatar asked Sep 19 '25 03:09

Yoo


1 Answers

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.

like image 93
Trey Jackson Avatar answered Sep 22 '25 05:09

Trey Jackson