From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: C++-Mode
Date: Wed, 08 Jan 2003 11:18:02 -0700 [thread overview]
Message-ID: <3E1C6B5A.5050703@ihs.com> (raw)
In-Reply-To: 3e1c001c@news.uni-ulm.de
Boris H. wrote:
> kgold wrote:
>>The default for emacs using M-x compile is to call make.
>>
>>While you could change the default, experienced programmers typically
>>create a makefile.
>
> I know, but since I only write small programms, there's no real need for a
> makefile.
make has implicit rules to build an executable from its source file. So all
you should need to do in the foo.cc buffer is `M-! make foo'. If that works,
it's just a matter of how you want to automate it:
1. Use the `M-x compile' command, with the compile-command customized as
described in its doc string.
2. Write your own `M-x compile-buffer' command:
(defun compile-buffer (&optional buffer)
"Compile the file visited in BUFFER (by default, the selected buffer)."
(interactive "bCompile buffer: ")
(or buffer
(setq buffer (selected-buffer)))
(save-excursion
(set-buffer buffer)
(compile (format "make %s" (file-name-sans-extension
(file-name-nondirectory buffer-file-name))))))
> In Ada-mode, there are commands ada-compile-application and
> ada-run-application. I want this facility in C++-mode, too.
Can those be easily adapted to C++? If not, you can use the compile-buffer
example above; just use shell-command or term instead of compile.
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
next prev parent reply other threads:[~2003-01-08 18:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-07 15:23 C++-Mode Boris H.
2003-01-07 16:29 ` C++-Mode kgold
2003-01-08 10:39 ` C++-Mode Boris H.
2003-01-08 18:18 ` Kevin Rodgers [this message]
2003-01-13 8:44 ` C++-Mode Lee Sau Dan
2003-01-13 8:44 ` C++-Mode Lee Sau Dan
2003-01-08 15:17 ` C++-Mode Dave Sumsky
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=3E1C6B5A.5050703@ihs.com \
--to=kevin.rodgers@ihs.com \
/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).