From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: FCC Newsgroups: gmane.emacs.help Subject: Re: compile command Date: Fri, 26 Nov 2004 10:31:02 +0100 Organization: UPC Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1101461852 658 80.91.229.6 (26 Nov 2004 09:37:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Nov 2004 09:37:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 26 10:37:28 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CXcXf-0005OI-00 for ; Fri, 26 Nov 2004 10:37:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXcgu-0007RZ-Lx for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Nov 2004 04:47:00 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!news.ks.uiuc.edu!news.glorb.com!solnet.ch!solnet.ch!news-zh.switch.ch!irazu.switch.ch!switch.ch!news.rediris.es!montagut-news.cesca.es!news.upc.es!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-NNTP-Posting-Host: adca05.upc.es Original-X-Trace: defalla.upc.es 1101461471 27546 147.83.51.18 (26 Nov 2004 09:31:11 GMT) Original-X-Complaints-To: newsmngr@upc.es Original-NNTP-Posting-Date: 26 Nov 2004 09:31:11 GMT User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:126942 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 Xref: main.gmane.org gmane.emacs.help:22344 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22344 Rodrigo Canellas articulated on 11/25/2004 11:00 PM: >Hi, > > >In my '.emacs' I have this: > > (global-set-key [f9] 'compile) > >But I would like to 'make' the project when I pressed 'f9'. > >I tried > > (global-set-key [f9] '(compile make)) > >but I got a syntax error. > >I also tried (global-set-key [f9] '(compile (make))) > >but I got this message: > > Wrong type argument: commandp, (compile (make) > > >Does anyone know how it should be done? > > >Thanks, > > >Rodrigo Canellas > > > > You need to write something like (defun run-make() "Runs make skipping the intermediate `compile' step." (interactive) (shell-command "/directory/to/make/executable/make -f /directory/to/makefile/Makefile1" "*run-make*" "*run-make-errors")) And then bind this function to f9 by (global-set-key [f9] 'run-make) Others may have better suggestions. -- FCC. === You will not understand the power and beauty of your youth until they've faded. -Lee Perry and Quindon Tarver.