Hi,
Anyone know how can I had in emacs config the feature that when I put
my code between
#if 0
...c or c++ code...
#endif
the text will appear red like /* and */ comment...
please help me!
Patrick
Patrick Boulay <·······@hotmail.com> wrote:
> Hi,
> Anyone know how can I had in emacs config the feature that when I put
> my code between
> #if 0
> ...c or c++ code...
> #endif
> the text will appear red like /* and */ comment...
I think you should ask in one of the EMACS groups instead, especially
comp.emacs.xemacs and comp.emacs.
Si vales, valeo.
--
Richard Krushelnitskiy "A mathematician is a blind man in a dark
·········@gmx.net room looking for a black cat which isn't
http://rkrush.cjb.net there." -- Charles Darwin
From: Christos Kloukinas *replace Xos with inria*
Subject: Re: Lisp on XEmacs
Date:
Message-ID: <m2bsmvihg0.fsf@Xos.fr>
·······@hotmail.com (Patrick Boulay) writes:
> Hi,
>
> Anyone know how can I had in emacs config the feature that when I put
> my code between
>
> #if 0
> ...c or c++ code...
>
> #endif
>
> the text will appear red like /* and */ comment...
Gessing from the above line that what you want to do is _comment_ out
some code, I believe that you should use the usual lisp comment
character ;. So, if you have a line like this:
(lisp code you want to comment out)
you should add before it a ; like this:
; (lisp code you want to comment out)
If you want to comment out a whole region, you can mark it and then
call M-x comment-region .
This command takes a numeric argument which tells it the number of ;'s
to place in front of each line (the comment level),
e.g., C-u 4 M-x comment-region.
If you later on wish to uncomment the region, you mark it and call the
comment-region command with a negative integer, e.g.,
C-u - 3 M-x comment-region , to remove the first 3 leading ;'s from
each line in the region.
Christos
Christos Kloukinas *replace Xos with inria* <··················@Xos.fr> writes:
> ·······@hotmail.com (Patrick Boulay) writes:
>
> > Hi,
> >
> > Anyone know how can I had in emacs config the feature that when I put
> > my code between
> >
> > #if 0
> > ...c or c++ code...
> >
> > #endif
> >
> > the text will appear red like /* and */ comment...
> Gessing from the above line that what you want to do is _comment_ out
> some code, I believe that you should use the usual lisp comment
> character ;. So, if you have a line like this:
> (lisp code you want to comment out)
> you should add before it a ; like this:
> ; (lisp code you want to comment out)
Not guessing from the above line as I understand the poster wants to
have the code between #if 0 and #endif look like comments (as vim
does).
I don't know how to do it but something like comp.gnu.emacs might be a
better place to ask questions like this.
--
Janis Dzerins
If million people say a stupid thing it's still a stupid thing.