From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Flaschen Newsgroups: gmane.emacs.help Subject: Re: Binding same command to two separte keys?? Date: Fri, 13 Apr 2007 15:17:10 -0400 Message-ID: <461FD736.2080709@gatech.edu> References: <1176490954.3065.75.camel@CASE> <1176491561.32280.9.camel@oaktree.karlheg.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1176492076 8241 80.91.229.12 (13 Apr 2007 19:21:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2007 19:21:16 +0000 (UTC) To: emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 13 21:21:13 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HcRKb-0007vD-8R for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Apr 2007 21:21:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HcROt-0006WN-Ml for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Apr 2007 15:25:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HcROf-0006WH-Nu for help-gnu-emacs@gnu.org; Fri, 13 Apr 2007 15:25:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HcROe-0006Uo-6W for help-gnu-emacs@gnu.org; Fri, 13 Apr 2007 15:25:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HcROe-0006UM-0E for help-gnu-emacs@gnu.org; Fri, 13 Apr 2007 15:25:24 -0400 Original-Received: from deliverator4.gatech.edu ([130.207.165.164]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1HcRKK-000641-OB for help-gnu-emacs@gnu.org; Fri, 13 Apr 2007 15:20:56 -0400 Original-Received: from deliverator4.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id EC577A495 for ; Fri, 13 Apr 2007 15:20:55 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from mailprx2.gatech.edu (mailprx2.prism.gatech.edu [130.207.171.21]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.mail.gatech.edu", Issuer "RSA Data Security, Inc." (verified OK)) by deliverator4.gatech.edu (Postfix) with ESMTP id D7058A48E for ; Fri, 13 Apr 2007 15:20:55 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from [128.61.73.81] (r73h81.res.gatech.edu [128.61.73.81]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (sasl: method=PLAIN, username=mflaschen3@mailprx2.gatech.edu, sender=n/a) by mailprx2.gatech.edu (Postfix) with ESMTP id F2F9A25F9 for ; Fri, 13 Apr 2007 15:17:10 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) User-Agent: Thunderbird 1.5.0.10 (X11/20070306) In-Reply-To: <1176491561.32280.9.camel@oaktree.karlheg.lan> X-Enigmail-Version: 0.94.3.0 X-detected-kernel: Solaris 9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42654 Archived-At: 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: [?\M-s] 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