unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* CC-mode indentation after macros
@ 2004-10-19  7:59 Ola Nilsson
  2004-10-19 18:15 ` Star Watcher
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ola Nilsson @ 2004-10-19  7:59 UTC (permalink / raw)


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

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

end of thread, other threads:[~2004-10-19 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-19  7:59 CC-mode indentation after macros Ola Nilsson
2004-10-19 18:15 ` Star Watcher
2004-10-19 19:22 ` Ola Nilsson
2004-10-19 20:04 ` Stefan Monnier

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