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

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

Re: Binding same command to two separte keys??


From: Matthew Flaschen
Subject: Re: Binding same command to two separte keys??
Date: Fri, 13 Apr 2007 17:04:40 -0400
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

William Case wrote:
> Over the last 2 years I have written about 10 keybinding functions, that
> are in my .emacs, and that I use all the time.  They have always been in
> the form of (global-set-key [(M-s)] 'shell-command).

I don't know what to tell you.  There are many different ways to write
keyboard shortcuts, but I've never heard of that one, and it doesn't
work for me.

> Now 'kbd' shows
> up, and '?\' to replace it.

?\ was here first, as far as I can tell.  kbd is supposed to be an easy
method to unify all the others, but I think it's slightly (perhaps
negligibly) slower.

> So ... in (global-set-key (kbd "M-s") #'shell-command)

No, just
(global-set-key (kbd "M-s") 'shell-command)

> 
> Does ?\ = kbd ?

No

> Does [  ] replace (  ) ?

Not really.  As I said, there are many incompatible methods.  They seem
to have little connection to each other

> Are the "   " necessary or not necessary ?

It's necessary if you use kdb.  It's not allowed if you use the method I
recommended.

> What syntax would work for both standard emacs functions and my own user
> functions?

I don't think this should make a difference.

> Emacs 22 is going to show up when I upgrade to Fedora 7.  Is keybinding
> going to be different again?

I don't think so.

Matthew Flaschen




reply via email to

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