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

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

Re: [OT] Re: What is the best way to navigate #ifdef and #endif in C pro


From: Aaron W . Hsu
Subject: Re: [OT] Re: What is the best way to navigate #ifdef and #endif in C program
Date: Wed, 08 Dec 2010 15:23:21 -0000
User-agent: nn/6.7.3

Fren Zeee <frenzeee@gmail.com> writes:

>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 */

Actually, there are a lot of them in common use. Here are the one's I
use regularly, and you can check with your implementation to see if it
provides them:

#| |#   block comments
#;      Expression comments

I find the expression comments to be very useful. Basically, it let's
you comment out the next expression, such as this:

    (if (test)
        #;(bad
             nothing
             or another)
        (good thing)
        (other thing))
        
Now, some people don't like it because it plays with their Emacs
commenting modes. Since I don't use Emacs, this doesn't bother me. ;-)
On the other hand, the workaround if you don't want to hack your Scheme
highlighting is to do something like this instead:

    (if (test)
        #;
        (bad
           nothing
           or another)
        (good thing)
        (other thing))

This will keep the highlighting mostly in check and still do the same
thing.

        Aaron W. Hsu


reply via email to

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