From: YOUNG <breadncup@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: c preprocessor and indent problem in c-mode?
Date: Sun, 25 Jan 2009 16:46:38 -0800 (PST) [thread overview]
Message-ID: <035566ec-3070-441e-8040-6f44c5c0d96c@p36g2000prp.googlegroups.com> (raw)
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?
next reply other threads:[~2009-01-26 0:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 0:46 YOUNG [this message]
2009-01-26 2:03 ` c preprocessor and indent problem in c-mode? YOUNG
2009-01-26 9:00 ` Alan Mackenzie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=035566ec-3070-441e-8040-6f44c5c0d96c@p36g2000prp.googlegroups.com \
--to=breadncup@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.