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

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

Re: emacs keybinding syntaxes bewilderment


From: Mike Mattie
Subject: Re: emacs keybinding syntaxes bewilderment
Date: Sat, 15 Dec 2007 23:22:33 -0800

On Sat, 15 Dec 2007 08:48:45 -0800 (PST)
rustom <rustompmody@gmail.com> wrote:

> On Dec 15, 3:24 am, Xah Lee <x...@xahlee.org> wrote:
> > recently i took some time to study the various syntax variations for
> > keybinding in emacs.
> > Here's a list:
> > :
> > :

That did confuse me for a while. I decided it was time to make it at least 
consistent in my
configuration. After asking for some advice I settled on (kbd). This function 
below takes
the pain out of keybindings.

I use it as follows:

M-x insert-key-notation

it then prompts for the key sequence, and generates the code.

(defun insert-key-notation ()
  "inject a complete \(kbd \"sequence\"\) with key notation for a key sequence 
given by prompt"
  (interactive)
  (insert "(kbd \"")
  (insert (format-kbd-macro (read-key-sequence "Key? " nil t)))
  (insert "\")")
  )


> Thanks Xah for an informative (for me at least) rant. Ive bookmarked
> it!
> I am using emacs for the last 15 years but every time I try to do a
> define-key or global-set-key, I have to fish around in the info pages
> to get the key syntax right.
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Attachment: signature.asc
Description: PGP signature


reply via email to

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