From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Change of C indentation style ('{') Date: Fri, 24 Oct 2003 10:25:44 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200310240125.KAA11125@etlken.m17n.org> References: <200310230109.KAA09465@etlken.m17n.org> <5bhe1zy4z8.fsf@lister.roxen.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1066958980 12766 80.91.224.253 (24 Oct 2003 01:29:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 01:29:40 +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 03:29:38 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 1ACqlm-0007Nv-00 for ; Fri, 24 Oct 2003 03:29:38 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACqlm-0003mn-00 for ; Fri, 24 Oct 2003 03:29:38 +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 1ACqjU-0001pp-E5 for emacs-devel@quimby.gnus.org; Thu, 23 Oct 2003 21:27:16 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACqjJ-0001iM-Ti for emacs-devel@gnu.org; Thu, 23 Oct 2003 21:27:05 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACqin-0001DR-8a for emacs-devel@gnu.org; Thu, 23 Oct 2003 21:27:04 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACqi8-0008Q6-KI; Thu, 23 Oct 2003 21:25:52 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id h9O1Pjh23299; Fri, 24 Oct 2003 10:25:45 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id h9O1Pis09912; Fri, 24 Oct 2003 10:25:44 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA11125; Fri, 24 Oct 2003 10:25:44 +0900 (JST) Original-To: mast@lysator.liu.se In-reply-to: <5bhe1zy4z8.fsf@lister.roxen.com> (message from Martin Stjernholm on Fri, 24 Oct 2003 00:16:43 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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:17390 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17390 In article <5bhe1zy4z8.fsf@lister.roxen.com>, Martin Stjernholm writes: > 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 see. > 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. Aren't there any way to make Emacs recognize the regular expression, say "[A-Z_]+", as an additional substatement introducing keyword? --- Ken'ichi HANDA handa@m17n.org