From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: GVK Newsgroups: gmane.emacs.help Subject: auto complile the C program in the current buffer Date: Mon, 14 Feb 2005 00:21:30 +0530 Organization: Aioe.org NNTP Server Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1108320619 28541 80.91.229.2 (13 Feb 2005 18:50:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Feb 2005 18:50:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 13 19:50:19 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D0Oox-0003Nd-56 for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Feb 2005 19:50:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D0P4L-00058w-7O for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Feb 2005 14:06:09 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!news.moat.net!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: BAkPw1tFtsF5IWLEhBNnDw.domitilla.aioe.org Original-X-Complaints-To: abuse@aioe.org Original-NNTP-Posting-Date: Sun, 13 Feb 2005 18:50:10 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) Original-Xref: shelby.stanford.edu gnu.emacs.help:128532 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:24064 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24064 Hello, I have the following lines in my .emacs for python mode (add-hook 'python-mode-hook '(lambda() (define-key py-mode-map "\C-c\C-c" 'py-execute-prog) (define-key py-mode-map "\C-c\C-g" 'py-call-pdb) (define-key py-mode-map "\C-c\C-w" 'py-checker))) (load "py-mode-ext.el") When I type C-c C-c in python mode, the python program in the current buffer will be interepreted. How can I do the same with C? I have the following lines for C mode (define-key c-mode-map "\C-c\C-c" 'compile) (setq compile-command "gcc ") But when I type C-c C-c, all I get in minibuffer is the line gcc How can I make C-c C-c compile the C prog in the current buffer? Regards, GVK