From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emmy Noether Newsgroups: gmane.emacs.help Subject: Re: What is the best way to navigate #ifdef and #endif in C program Date: Thu, 5 Aug 2010 11:00:39 -0700 (PDT) Organization: http://groups.google.com Message-ID: <61c8ffb0-320a-45d6-a346-a00f71092a0d@o19g2000yqb.googlegroups.com> References: <53f62f81-fb10-4fb6-87ce-0eb5609d12f5@h17g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291946102 9324 80.91.229.12 (10 Dec 2010 01:55:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 01:55:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 02:54:58 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQsAZ-0000o2-25 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 02:54:58 +0100 Original-Received: from localhost ([127.0.0.1]:46781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQsAR-0001cs-Pj for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 20:53:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!o19g2000yqb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help, comp.unix.shell, comp.lang.c, comp.lang.lisp, comp.lang.scheme Original-Lines: 50 Original-NNTP-Posting-Host: 75.31.67.201 Original-X-Trace: posting.google.com 1281031239 3856 127.0.0.1 (5 Aug 2010 18:00:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 5 Aug 2010 18:00:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o19g2000yqb.googlegroups.com; posting-host=75.31.67.201; posting-account=Z8AisQoAAACIjFU5C3oU1NRhdLR6FVf4 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:180429 comp.unix.shell:246366 comp.lang.c:979525 comp.lang.lisp:290959 comp.lang.scheme:87281 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:09:02 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77158 Archived-At: On Aug 3, 9:45=A0pm, Fren Zeee wrote: > On Aug 2, 5:31=A0pm, "Daniel (Youngwhan)" 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.