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

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

Re: hightlight if/ifdef blocks


From: Martin
Subject: Re: hightlight if/ifdef blocks
Date: 2 Nov 2006 00:22:33 -0800
User-agent: G2/1.0

Hi,

originally I asked somebody about using // or /* */ in C.
1. old c-compilers do not allow the use of // because it was not part
of the "old" ANSI c standard.
2. new c-compilers mostly do, but some people still prefer to use /* */

My idea was to use // in "regular" comments and /* */ for commenting
out huge blocks of code.
I was then told that nesting of comments might or might not work with
the one or the other compiler.
To avoid this uncertainty I should use #if 0 which I think makes sense
and is ok for me. (can't find the post though, sorry ...)
However, emacs does not show me these blocks as "unused" comments, but
as c-code.
So, back to my original question ... how to get these blocks to change
their color :-)

Martin


Fang lun gang wrote:
> >>>>> "Michaël" == Michaël Cadilhac <address@hidden> writes:
>
>     Michaël> I think Martin was talking about nesting /* */. The use of #if 0 
> is
>     Michaël> quite a good practice.
>
> Thank you.
>
> So you mean if we can use '//', we'd prefer "#if 0" to "/* */".
> 
> -- 
> Fang lun gang



reply via email to

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