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: Tassilo Horn
Subject: Re: How to change key bindings in a particular mode
Date: Thu, 23 Apr 2009 09:14:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

"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 via email to

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