[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CC-mode indentation after macros
From: |
Ola Nilsson |
Subject: |
CC-mode indentation after macros |
Date: |
Tue, 19 Oct 2004 07:59:20 GMT |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Hello,
I'm working with code that contains a number of debug
macros. Typically the look like this:
#ifdef DEBUG
#define DEB(x) x
#else
#define DEB(x)
#endif
These are used in the code like this:
void foo(void)
{
...
DEB(printf("Debug print";)
...
}
That is, in many places the semicolon is inside the macro not outside
(that would generate empty statements that lint would complain over).
Now, my problem is that cc-mode wants to indent the next line, but I
would like to have int on the same indentation level as the DEB
line. How can I get this behaviour? Do I need to add regexps for the
DEB() types of macros? And in that case, where should I add them?
Thanks for any help,
--
/Ola Nilsson
- CC-mode indentation after macros,
Ola Nilsson <=