all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to change key bindings in a particular mode
Date: Thu, 23 Apr 2009 09:14:53 +0200	[thread overview]
Message-ID: <87ljpr6dua.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: 004e01c9c389$3811b430$c2b22382@us.oracle.com

"Drew Adams" <drew.adams@oracle.com> writes:

Hi!

> 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'.

Just a short addition: Instead of using somewhat special keybinding
syntax like "\C-a", you can also use (kbd "C-a").  This has the benefit
that the `kbd' macro accepts the keys exactly as they're printed by the
help commands (like `C-h k' and `C-h b').

Bye,
Tassilo





      reply	other threads:[~2009-04-23  7:14 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
2009-04-23  7:14   ` Tassilo Horn [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljpr6dua.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.