From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.devel Subject: Re: Change of C indentation style ('{') Date: Fri, 24 Oct 2003 00:16:43 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5bhe1zy4z8.fsf@lister.roxen.com> References: <200310230109.KAA09465@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066947518 26907 80.91.224.253 (23 Oct 2003 22:18:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 22:18:38 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 24 00:18:33 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACnmr-0007Ft-00 for ; Fri, 24 Oct 2003 00:18:33 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACnmr-0002Wz-00 for ; Fri, 24 Oct 2003 00:18:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACnmN-0002nC-QY for emacs-devel@quimby.gnus.org; Thu, 23 Oct 2003 18:18:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACnmH-0002ly-7g for emacs-devel@gnu.org; Thu, 23 Oct 2003 18:17:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACnll-0002ac-Dw for emacs-devel@gnu.org; Thu, 23 Oct 2003 18:17:56 -0400 Original-Received: from [194.52.182.190] (helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACnlE-0002SJ-Mm; Thu, 23 Oct 2003 18:16:52 -0400 Original-Received: by mail.roxen.com (Postfix, from userid 52) id C67249A91; Fri, 24 Oct 2003 00:16:45 +0200 (MEST) Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id A167E9A0E; Fri, 24 Oct 2003 00:16:41 +0200 (MEST) Original-Received: from mast by lister.roxen.com with local (Exim 3.36 #1 (Debian)) id 1ACnl6-00061A-00; Fri, 24 Oct 2003 00:16:44 +0200 Original-To: Kenichi Handa In-Reply-To: <200310230109.KAA09465@etlken.m17n.org> (Kenichi Handa's message of "Thu, 23 Oct 2003 10:09:47 +0900 (JST)") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17388 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17388 Kenichi Handa wrote: > I've just found that, in HEAD, the default indentation style > of '{' in C was changed in the case that it was placed on > the next line of macros such as FOR_EACH_FRAME. That's because CC Mode analyzes the braces differently now. It marks them as defun-open and defun-close instead of substatement-open and substatement-close. That is because FOR_EACH_FRAME isn't recognized as a substatement introducing keyword, and barring macro oddities everything else has to be function definitions. I'm not sure what to do about it. There are other cases when this new heuristic is useful, e.g. for functions in macro arguments or gcc nested functions.