From: Sven Utcke <utcke+news@informatik.uni-hamburg.de>
Subject: Q: less intelligent c-mode
Date: 25 Sep 2002 17:21:34 +0200 [thread overview]
Message-ID: <vd0fzvyaydd.fsf@kogs31.informatik.uni-hamburg.de> (raw)
Hi,
within mmm-mode, I need to write some C-code. However, this will not
be valid C-code, but rather some fragments only; in particular there
will not generally be a function declaration included. However,
cc-mode in that case insists to
a) indent everything to start in the first column
b) colour anything starting in column 1 as a function declaration.
Is there any way lobotomize cc-mode some in such a way that it will
indent relative to the first line within the region it is seeing?
Sven
PS: To give you an idea: cc-mode will indent
for (i=1; i<the_outline->n; i++) {
VASSERT(the_outline->x[2][i] == 1.0);
} /* end for |i| */
if (verbose) {
fprintf(stderr, "# dist = %g\n", dist);
}
as
for (i=1; i<the_outline->n; i++) {
VASSERT(the_outline->x[2][i] == 1.0);
} /* end for |i| */
if (verbose) {
fprintf(stderr, "# dist = %g\n", dist);
}
--
_ __ The Cognitive Systems Group
| |/ /___ __ _ ___ University of Hamburg
| ' </ _ \/ _` (_-< phone: +49 (0)40 42883-2576 Vogt-Koelln-Strasse 30
|_|\_\___/\__, /__/ fax : +49 (0)40 42883-2572 D-22527 Hamburg
|___/ http://kogs-www.informatik.uni-hamburg.de/~utcke/home.html
reply other threads:[~2002-09-25 15:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=vd0fzvyaydd.fsf@kogs31.informatik.uni-hamburg.de \
--to=utcke+news@informatik.uni-hamburg.de \
/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).