I know that it should be simple to set a binding. As quoted from elisp reference manual:
(local-set-key key binding)
(define-key (current-local-map) key binding)
(local-set-key key binding)
(define-key (current-local-map) key binding)
Code: Select all
(global-set-key [s-tab] 'slime-complete-symbol) ; the "s" refers to the key with a windows logo
(global-set-key [24 right] 'previous-buffer) ; 24 means C-x
(global-set-key [24 C-right] 'previous-buffer)
(global-set-key [24 left] 'next-buffer)
(global-set-key [24 C-left] 'next-buffer)
Code: Select all
(setq mew-summary-mode-hook '(lambda ()
(local-set-key "\C-x\C-y" 'mew-popmail)))
Looking at LOCAL-SET-KEY's source, it uses CURRENT-LOCAL-MAP, which may be nil, in which case it creates a sparse keymap.rubing wrote:@gugamilare.
I don't want to set a global key. I only want my functions to be part of the local mode map for mew (my mailing program). As I just shared above I found out how to do it. However, I am still clueless where to find the name of a given mode's keymap
Keymap objects are what I said are nameless. A “named keymap†is, as far as I can tell, just a variable storing a keymap object. You might grep the source of the program you're using for "make-sparse-keymap", which is likely to be near a variable declaration.rubing wrote:Paul,
As it suggests in the manual, most local modes have named keymaps: http://www.gnu.org/software/emacs/manua ... ymaps.html