From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jim Hunter Newsgroups: gmane.emacs.help Subject: Trying to bind a new key in C mode Date: 11 Feb 2005 18:09:42 -0600 Message-ID: <87is4y3agp.fsf@paradigmshift.homelinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108167318 17345 80.91.229.2 (12 Feb 2005 00:15:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2005 00:15:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 12 01:15:18 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CzkwI-00018n-Sj for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Feb 2005 01:15:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzlBK-0002s7-Ql for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Feb 2005 19:30:42 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!pln-w!lotsanews.com!cyclone-sf.pbi.net!216.218.192.242!news.he.net!newsfeed1.easynews.com!easynews.com!easynews!hwmnpeer01.phx!hwmedia!hw-poster!fe06.lga.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 13 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-X-Trace: dkoicekneficefklohhefhlgpcldkcibhefoknolipicjeffbaebglacgccibhffdnoddjbeenpgpnpohlpangolcejfecicommofilpgpfmdhmpbcnclclcmanefdgjegcmjhhibopfakdb Original-NNTP-Posting-Date: Fri, 11 Feb 2005 17:16:53 MST Original-Xref: shelby.stanford.edu gnu.emacs.help:128511 Original-To: help-gnu-emacs@gnu.org 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:24043 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24043 I would like to bind C-c c to run the 'compile' function in C mode (and, ultimately, C-c r to run 'recompile'), but cannot get it to work. Unfortunately, I know nothing about Lisp, so I simply copied the example from the Emacs info page "Local Keymaps" and modified it to this (in my .emacs file): (add-hook 'c-mode-hook '(lambda () (define-key c-mode-map "\C-cc" 'compile))) Any help would be greatly appreciated Jim Hunter