[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pre-processor commands in c-mode
From: |
Benjamin Riefenstahl |
Subject: |
Re: Pre-processor commands in c-mode |
Date: |
22 Mar 2003 17:14:22 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi Kevin, Pascal,
Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
> Does any one know of a good method / setting / package for better
> handling of pre-processor commands in c-mode, specificly spacing and
> auto-indentation?
Have a look at the CC mode manual in Info (C-h i). It has several
chapters on customizing indentation. You probably want to change the
cpp-macro indentation setting.
> Kevin Dziulko <dziulko@klaatu.canisius.edu> writes:
> > if (x)
> > {
> > #ifdef DEBUG
> > printf("null");
Pascal Bourguignon <pjb@informatimago.com> writes:
> Normally, cpp takes into account only directive whose '#' is in column 0.
> That's why you sometimes see directives indented this way:
>
> #ifdef COND1
> # ifdef COND2
Actually the C preprocessor doesn't care, the syntax intended by Kevin
is legal and works. Whether it is good style is another question.
Hope this helps, benny