help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c preprocessor and indent problem in c-mode?


From: YOUNG
Subject: c preprocessor and indent problem in c-mode?
Date: Sun, 25 Jan 2009 16:46:38 -0800 (PST)
User-agent: G2/1.0

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]