unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Q: less intelligent c-mode
@ 2002-09-25 15:21 Sven Utcke
  0 siblings, 0 replies; only message in thread
From: Sven Utcke @ 2002-09-25 15:21 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-25 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-25 15:21 Q: less intelligent c-mode Sven Utcke

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).