[Top][All Lists]

[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 15:17:10 -0400
User-agent: Thunderbird (X11/20070306)

Karl Hegbloom wrote:
> On Fri, 2007-04-13 at 15:02 -0400, William Case wrote:
>> I have set (global-set-key [(M-s)] 'shell-command) in my .emacs.
>> I also want to keep the M-! shell-command binding
>> Nothing happens when I use M-s, nor do I get an error message.
> I think that the syntax of the expression describing the key is
> incorrect.

The correct syntax is:


  Try looking at the documentation of the `kbd' macro (F1 f
> kbd).  You can use it there, like:
>  (global-set-key (kbd "M-s") #'shell-command)

There's no need for kbd here.  It's unnecessary overhead.

Matt Flaschen

reply via email to

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