Prev: +++ NFL Jerseys On Sale at www.ajerseys.com
Next: ===Christian Louboutin - www.vipchristianlouboutin.com
From: Fren Zeee on 4 Aug 2010 00:45 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: Elena on 4 Aug 2010 12:20 On Aug 4, 4:45 am, Fren Zeee <frenz...(a)gmail.com> wrote: > If there is a wrapper do nothing type function in elisp/clisp/scheme > which can have the same effect as commenting out. In Emacs Lisp, if you are looking for a way to comment out blocks of text, you are out of luck. I've read Pythonistas use multi-line strings as multi-line comments (strings are always multi-line in Emacs). If you are looking for a way to comment out blocks of code, you can do that with a macro. I remember having seen a "comment" macro inside Emacs Lisp packages kindly published by Pascal J. Bourguignon here: http://www.informatimago.com/develop/emacs/index.html
From: Elena on 4 Aug 2010 12:23 On Aug 4, 4:45 am, Fren Zeee <frenz...(a)gmail.com> wrote: > If there is a wrapper do nothing type function in elisp/clisp/scheme > which can have the same effect as commenting out. Scheme multi-line comments are here: http://srfi.schemers.org/srfi-30/srfi-30.html Which also is first hit when searching the Net for "scheme multi line comments".
From: Emmy Noether on 5 Aug 2010 14:00 On Aug 3, 9:45 pm, 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. > > 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 */ I would remove a function block by wrapping in one of man conditionals like (cond (f (comment-out-block)) ) the short circuit evaluation would not even process it. I plan to test this idea in the future.
From: Aaron W. Hsu on 6 Aug 2010 00:59
Fren Zeee <frenzeee(a)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 |