unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: FCC <fcc509@netscape.net>
Subject: Re: compile command
Date: Fri, 26 Nov 2004 10:31:02 +0100	[thread overview]
Message-ID: <co6t4v$qsq$1@defalla.upc.es> (raw)
In-Reply-To: <mailman.1520.1101420923.27204.help-gnu-emacs@gnu.org>

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.

  parent reply	other threads:[~2004-11-26  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1520.1101420923.27204.help-gnu-emacs@gnu.org>
2004-11-25 23:29 ` compile command Pascal Bourguignon
2004-11-26  9:31 ` FCC [this message]
2004-11-25 22:00 Rodrigo Canellas
2004-11-26  9:01 ` Kai Grossjohann
2004-11-26  9:13   ` Rodrigo Canellas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='co6t4v$qsq$1@defalla.upc.es' \
    --to=fcc509@netscape.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).