unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* c preprocessor and indent problem in c-mode?
@ 2009-01-26  0:46 YOUNG
  2009-01-26  2:03 ` YOUNG
  2009-01-26  9:00 ` Alan Mackenzie
  0 siblings, 2 replies; 3+ messages in thread
From: YOUNG @ 2009-01-26  0:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

If there is a following code, emacs does not present indent correctly.

#incude <stdio.h>

int main(void) {
  int a = 10;
#ifdef AAA
  if (a == 10) {
    printf("a:%d\n", a);
#else
    if (b == 10) {
      printf("b=10\n");
#endif
    }

#endif
  }

If the curly brace is not closed before the preprocessor, emacs seems
to confuse to make indent.

Is there anyone who know this problem and how to resolve?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-26  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26  0:46 c preprocessor and indent problem in c-mode? YOUNG
2009-01-26  2:03 ` YOUNG
2009-01-26  9:00 ` Alan Mackenzie

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