From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: What is the best way to navigate #ifdef and #endif in C program Date: Fri, 6 Aug 2010 17:03:58 +0000 (UTC) Organization: muc.de e.V. Message-ID: References: <53f62f81-fb10-4fb6-87ce-0eb5609d12f5@h17g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291856812 32157 80.91.229.12 (9 Dec 2010 01:06:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 01:06:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 02:06:46 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 1PQUy5-0004CZ-Np for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 02:06:45 +0100 Original-Received: from localhost ([127.0.0.1]:46037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQUy4-0008Gw-W8 for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 20:06:45 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!newsfeed.freenet.ag!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: marvin.muc.de Original-X-Trace: colin2.muc.de 1281114238 61450 2001:608:1000::2 (6 Aug 2010 17:03:58 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: Fri, 6 Aug 2010 17:03:58 +0000 (UTC) User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Original-Xref: usenet.stanford.edu gnu.emacs.help:180475 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:76350 Archived-At: "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? Yes. Experiment with C-c C-n, C-c C-p, C-c C-u. Or if you don't like experimenting, read page "Movement Commands" in the CC Mode manual. > Daniel -- Alan Mackenzie (Nuremberg, Germaany).