From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Change of C indentation style ('{') Date: 24 Oct 2003 19:11:59 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200310230109.KAA09465@etlken.m17n.org> <5bhe1zy4z8.fsf@lister.roxen.com> <5bllrb5586.fsf@lister.roxen.com> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066991071 31829 80.91.224.253 (24 Oct 2003 10:24:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 10:24:31 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org, Kenichi Handa Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Oct 24 12:24:27 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 1ACz7L-0001e3-00 for ; Fri, 24 Oct 2003 12:24:27 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACz7L-0007Wo-00 for ; Fri, 24 Oct 2003 12:24:27 +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 1ACyzh-0006jA-Jk for emacs-devel@quimby.gnus.org; Fri, 24 Oct 2003 06:16:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACywV-00052h-Se for emacs-devel@gnu.org; Fri, 24 Oct 2003 06:13:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACyvw-0004m1-9P for emacs-devel@gnu.org; Fri, 24 Oct 2003 06:13:11 -0400 Original-Received: from [210.143.35.51] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACyvO-0004WK-V8; Fri, 24 Oct 2003 06:12:07 -0400 Original-Received: from mailgate3.nec.co.jp ([10.7.69.160]) by TYO201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id h9OAC0g25396; Fri, 24 Oct 2003 19:12:03 +0900 (JST) Original-Received: from mailsv.nec.co.jp (mailgate51.nec.co.jp [10.7.69.196]) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) with ESMTP id h9OAC0l05348; Fri, 24 Oct 2003 19:12:00 +0900 (JST) Original-Received: from edtmg01.lsi.nec.co.jp ([10.26.16.201]) by mailsv.nec.co.jp (8.11.7/3.7W-MAILSV-NEC) with ESMTP id h9OABxA07536; Fri, 24 Oct 2003 19:11:59 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg01.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id TAA01740; Fri, 24 Oct 2003 19:11:59 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id h9OABw7Q000313; Fri, 24 Oct 2003 19:11:58 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 4526437BC; Fri, 24 Oct 2003 19:11:59 +0900 (JST) Original-To: Martin Stjernholm System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <5bllrb5586.fsf@lister.roxen.com> Original-Lines: 31 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:17399 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17399 Martin Stjernholm writes: > > The thing is, I wouldn't be surprised if `macro oddities' are actually > > more common than the nested functions, or functions in macro arguments... > > You're probably right when it comes to C which uses cpp a lot. Perhaps > also for C++, ObjC and Pike; they have cpp support too but it's not > used quite as much there. > > It should be possible to add some more checks. Afterall, macro > constructs like that can only be ambiguous with really old fashioned > K&R style function definitions. I was thinking of things like: #define some_iterator_macro(var, arg1, arg2) ... void some_function (int y, int z) { some_iterator_macro (x, y + 3, z) { do_something_with (x); } } That sort of macro usage is fairly common, and looks vaguely like an ANSI C function declaration (no?). -miles -- I'm beginning to think that life is just one long Yoko Ono album; no rhyme or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff