From: Fren Zeee on
On Aug 2, 5:31 pm, "Daniel (Youngwhan)" <breadn...(a)gmail.com> wrote:
> Hi,
>
> If there is curly brace, it is easy to navigate between them by M-C-f
> and M-C-b in c-mode.
>
> However, I cannot find a way to navigate in like curly brace when it
> comes to #ifdef, #else, and #endif.
>
> For example, if there is a code like this:
>
> #ifdef A_DEFINED
> (...100 lines)
> #else
> (... 500 lines)
> #endif
>
> , is there a easy way to move the cursor from #endif to #ifdef or
> #else and vice versa?
>
> Daniel

You might get better luck posting in a C group also.

I use #ifdef ... #endif often also to comment out blocks of code
during debugging.

My question to CLISP/ELISP/scheme people is

If there is a wrapper do nothing type function in elisp/clisp/scheme
which can have the same effect as commenting out.

This is because I dont like to do comment-region/uncomment-region in
emacs.

These three lispy languages dont seem to have comment block construct
like C ie /* and */
From: Alessio Stalla on
On Aug 4, 12:27 pm, p...(a)informatimago.com (Pascal J. Bourguignon)
wrote:
> In Common Lisp you could try to use #| |#, but unfortunately, it is not like C /* and */:

Unfortunately? I don't find it unfortunate that I can nest comments,
while in the C-family I cannot.

Alessio
From: Pascal J. Bourguignon on
Alessio Stalla <alessiostalla(a)gmail.com> writes:

> On Aug 4, 12:27�pm, p...(a)informatimago.com (Pascal J. Bourguignon)
> wrote:
>> In Common Lisp you could try to use #| |#, but unfortunately, it is not like C /* and */:
>
> Unfortunately? I don't find it unfortunate that I can nest comments,
> while in the C-family I cannot.

Unfortunately for the OP, since he requested something like C /* comments */ ... ;-)

--
__Pascal Bourguignon__ http://www.informatimago.com/
From: josephoswald+gg on
On Aug 4, 12:45 am, Fren Zeee <frenz...(a)gmail.com> wrote:
> On Aug 2, 5:31 pm, "Daniel (Youngwhan)" <breadn...(a)gmail.com> wrote:
>
>
>
> > Hi,
>
> > If there is curly brace, it is easy to navigate between them by M-C-f
> > and M-C-b in c-mode.
>
> > However, I cannot find a way to navigate in like curly brace when it
> > comes to #ifdef, #else, and #endif.
>
> > For example, if there is a code like this:
>
> > #ifdef A_DEFINED
> > (...100 lines)
> > #else
> > (... 500 lines)
> > #endif
>
> > , is there a easy way to move the cursor from #endif to #ifdef or
> > #else and vice versa?
>
> > Daniel
>
> You might get better luck posting in a C group also.
With regard to Common Lisp, one may look in the Hyperspec index under
"comment"

http://www.lispworks.com/documentation/HyperSpec/Front/X_Mast_C.htm

and find two entries:

"semicolon": http://www.lispworks.com/documentation/HyperSpec/Body/02_dd.htm
"sharp-sign vertical bar": http://www.lispworks.com/documentation/HyperSpec/Body/02_dhs.htm

The second answers your question. That is, you can correct your
ignorance by consulting freely-available reference sources.

Another way to "#ifdef out" out a single form is

#+(or) or #-(and)

But these are trickier to work with.

> I use #ifdef ... #endif often also to comment out blocks of code
> during debugging.
>
> My question to CLISP/ELISP/scheme people is
>
> If there is a wrapper do nothing type function in elisp/clisp/scheme
> which can have the same effect as commenting out.
>
> This is because I dont like to do comment-region/uncomment-region in
> emacs.
>
> These three lispy languages dont seem to have comment block construct
> like C ie /* and */

From: Elena on
On Aug 4, 10:27 am, p...(a)informatimago.com (Pascal J. Bourguignon)
wrote:
> This is the reason why there is no point asking whether there is a
> feature X in CL.  You can always add any feature to the language,
> thanks to its macros or reader macros, and metalinguistic abilities in
> general.

Can macros really add features or can they just add syntactic sugar? A
custom "case" statement is just syntactic sugar, tail call
optimization is a feature.