help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile command


From: FCC
Subject: Re: compile command
Date: Fri, 26 Nov 2004 10:31:02 +0100
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

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.


reply via email to

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