From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.help Subject: Re: Pre-processor commands in c-mode Date: 22 Mar 2003 17:14:22 +0100 Organization: None Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048350366 12670 80.91.224.249 (22 Mar 2003 16:26:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 22 Mar 2003 16:26:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 22 17:26:04 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18wlop-0003Hv-00 for ; Sat, 22 Mar 2003 17:26:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18wloI-0005HU-01 for gnu-help-gnu-emacs@m.gmane.org; Sat, 22 Mar 2003 11:25:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!cicero.benny.turtle-trading.net!nobody Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 30 Original-Xref: shelby.stanford.edu gnu.emacs.help:111310 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7809 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7809 Hi Kevin, Pascal, Kevin Dziulko writes: > Does any one know of a good method / setting / package for better > handling of pre-processor commands in c-mode, specificly spacing and > auto-indentation? Have a look at the CC mode manual in Info (C-h i). It has several chapters on customizing indentation. You probably want to change the cpp-macro indentation setting. > Kevin Dziulko writes: > > if (x) > > { > > #ifdef DEBUG > > printf("null"); Pascal Bourguignon writes: > Normally, cpp takes into account only directive whose '#' is in column 0. > That's why you sometimes see directives indented this way: > > #ifdef COND1 > # ifdef COND2 Actually the C preprocessor doesn't care, the syntax intended by Kevin is legal and works. Whether it is good style is another question. Hope this helps, benny