From: "Drew Adams" <drew.adams@oracle.com>
To: "'Guo Qiang'" <guoqiang@smail.hust.edu.cn>, <help-gnu-emacs@gnu.org>
Subject: RE: How to change key bindings in a particular mode
Date: Wed, 22 Apr 2009 13:30:46 -0700 [thread overview]
Message-ID: <004e01c9c389$3811b430$c2b22382@us.oracle.com> (raw)
In-Reply-To: <20090422.221207.07882522.guoqiang@smail.hust.edu.cn>
> 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
next prev parent reply other threads:[~2009-04-22 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 14:12 How to change key bindings in a particular mode Guo Qiang
2009-04-22 20:30 ` Drew Adams [this message]
2009-04-23 7:14 ` Tassilo Horn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004e01c9c389$3811b430$c2b22382@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=guoqiang@smail.hust.edu.cn \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).