From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ola Nilsson Newsgroups: gmane.emacs.help Subject: CC-mode indentation after macros Date: Tue, 19 Oct 2004 07:59:20 GMT Organization: @Home Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87oeiz16lf.fsf@helmut.nilsson.homedns.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098173014 18673 80.91.229.6 (19 Oct 2004 08:03:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2004 08:03:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 19 10:03:25 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CJoxo-0006Rr-00 for ; Tue, 19 Oct 2004 10:03:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJp59-0001Df-3w for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Oct 2004 04:10:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer1.se.telia.net!se.telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:beGYeL0CyM8lerUYDXjlpNF+yQI= Original-Lines: 32 Original-NNTP-Posting-Host: 195.67.190.83 Original-X-Complaints-To: abuse@telia.com Original-X-Trace: newsc.telia.net 1098172760 195.67.190.83 (Tue, 19 Oct 2004 09:59:20 CEST) Original-NNTP-Posting-Date: Tue, 19 Oct 2004 09:59:20 CEST Original-Xref: shelby.stanford.edu gnu.emacs.help:125945 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21317 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21317 Hello, I'm working with code that contains a number of debug macros. Typically the look like this: #ifdef DEBUG #define DEB(x) x #else #define DEB(x) #endif These are used in the code like this: void foo(void) { ... DEB(printf("Debug print";) ... } That is, in many places the semicolon is inside the macro not outside (that would generate empty statements that lint would complain over). Now, my problem is that cc-mode wants to indent the next line, but I would like to have int on the same indentation level as the DEB line. How can I get this behaviour? Do I need to add regexps for the DEB() types of macros? And in that case, where should I add them? Thanks for any help, -- /Ola Nilsson