help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to change key bindings in a particular mode


From: Drew Adams
Subject: RE: How to change key bindings in a particular mode
Date: Wed, 22 Apr 2009 13:30:46 -0700

> I am now writing a small function for mew. I want to remake
> key bingings to a function in mew's draft mode. How can I do
> that ?

1. Find the name of the mode: `C-h v major-mode'. Example: `foo-mode'.

2. The mode's keymap is probably the same, with `-map' appended. Example:
`foo-mode-map'.

3. Define or redefine each of the keys you want in that map, using function
`define-key'. Example: (define-key foo-mode-map "\C-a" 'my-cmd)

To see the key bindings for a mode, use `C-h b'.

To better see the key bindings in a particular keymap, use `describe-keymap',
avaiable in library `help-fns+.el':
http://www.emacswiki.org/emacs/help-fns%2b.el
http://www.emacswiki.org/emacs/HelpPlus






reply via email to

[Prev in Thread] Current Thread [Next in Thread]