From: "Balaji V. Iyer" <bviyer@ncsu.edu>
Subject: Changing the Compile-Command in C/C++ Mode
Date: Fri, 27 Jan 2006 08:43:11 -0500 [thread overview]
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAP8kMXin0B5Bj/D/BqE7ALLCgAAAEAAAAITh2KjO4UxOmd3P0eYzEGoBAAAAAA==@ncsu.edu> (raw)
Hi Everyone,
I do not always use a make file and I would like the emacs (version
21.2.1) to modify the compile-command line to "g++ -Wall -O4 filename.c. I
thought this script did the trick but it didn't. I do not get any syntax
error, but when I hit the M-x compile command I still get "make -k"
How can I fix this? If you have an alternative implementation, I am willing
to use that too.
(function
(lambda ()
(unless (or (file-exists-p "makefile")
(file-exists-p "Makefile"))
(make-local-variable 'compile-command)
(setq compile-command
(concat "gcc -Wall -O3 -o"
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))
" "
(file-name-nondirectory buffer-file-name))))))
Any help is highly appreciated.
Thanking You,
Yours Sincerely,
Balaji V. Iyer.
PS. Please CC me when replying since I am not a subscribed member to this
mailing list.
next reply other threads:[~2006-01-27 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-27 13:43 Balaji V. Iyer [this message]
2006-01-28 0:45 ` Changing the Compile-Command in C/C++ Mode Kevin Rodgers
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=''\!'&'\!'AAAAAAAAAAAYAAAAAAAAAP8kMXin0B5Bj/D/BqE7ALLCgAAAEAAAAITh2KjO4UxOmd3P0eYzEGoBAAAAAA==@ncsu.edu' \
--to=bviyer@ncsu.edu \
/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).