From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Darrington Newsgroups: gmane.emacs.bugs Subject: Re: CC Mode 5.28 (C); struct braces are not indented in GNU style Date: Thu, 14 Dec 2006 11:20:35 +0900 Message-ID: <20061214022035.GA31435@csse.uwa.edu.au> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1015129618==" X-Trace: sea.gmane.org 1166062896 720 80.91.229.10 (14 Dec 2006 02:21:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 02:21:36 +0000 (UTC) Cc: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 14 03:21:34 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GugE0-0002sr-QB for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Dec 2006 03:21:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GugDz-0007XV-1t for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Dec 2006 21:21:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GugDw-0007WP-Mi for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2006 21:21:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GugDv-0007Vb-LA for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2006 21:21:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GugDv-0007VY-HU for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2006 21:21:27 -0500 Original-Received: from [130.95.128.59] (helo=asclepius2.uwa.edu.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GugDq-0004VB-KS; Wed, 13 Dec 2006 21:21:23 -0500 Original-Received: from panacea.kas (localhost.localdomain [127.0.0.1]) by panacea.uwa.edu.au (Postfix) with SMTP id 140CB4C4BD; Thu, 14 Dec 2006 11:21:18 +0900 (WST) Original-Received: from panacea (localhost.localdomain [127.0.0.1]) by panacea.prekas (Postfix) with ESMTP id 7855E4C357; Thu, 14 Dec 2006 11:21:17 +0900 (WST) X-UWA-Client-IP: 130.95.1.11 (UWA) Original-Received: from postfix.csse.uwa.edu.au (postfix.csse.uwa.edu.au [130.95.1.11]) by panacea.input (Postfix) with ESMTP id 0D1014C4BD; Thu, 14 Dec 2006 11:20:36 +0900 (WST) Original-Received: from pc-188 (pc188 [130.95.1.188]) by postfix.csse.uwa.edu.au (Postfix) with ESMTP id 2161E80002; Thu, 14 Dec 2006 11:20:35 +0900 (WST) Original-Received: from jmd by pc-188 with local (Exim 4.63) (envelope-from ) id 1GugD5-0008Tm-Rw; Thu, 14 Dec 2006 11:20:35 +0900 Original-To: Richard Stallman In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.10/RELEASE, bases: 14122006 #236519, status: clean X-SpamTest-Info: Profile: Formal (838/061214) X-SpamTest-Info: Profile: Detect Hard [UCS 2006-10-25] X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Marking Spam - Subject (UCS) [2006-10-25] X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15456 Archived-At: --===============1015129618== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 30, 2006 at 02:48:59PM -0500, Richard Stallman wrote: > GNU coding standards say:=20 > "It is important to put the open-brace that starts the body of a C > function in column one, and avoid putting any other open-brace or > open-parenthesis or open-bracket in column one" =20 >=20 >=20 > But given a code snippet like: >=20 > struct foobar =20 > { > int x; > }; >=20 > indent-region reformats it as: >=20 > struct foobar =20 > { > int x; > }; >=20 > which is contrary to the second clause of this sentence. >=20 > I don't think the C indentation commands know how to distinguish > functions from structs. But perhaps they should not alter > the indentation of a top-level open-brace. Braces in a struct initialisation get indented correctly, as in struct foobar =3D=20 { 1, 2 }; so it would seem to me, that it wouldn't be too much effort to get struct foobar { int x; int y; }; to indent in the same way. --=20 John Darrington jmd@csse.uwa.edu.au University of Western Australia http://www.csse.uwa.edu.au/= ~jmd PhD Candidate +61 8 6488 4775 --17pEHd4RhPHOinZp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFgLTzOpD/wRQI1/ERAoeZAJwKNhz5OeiCBSJrRF2pVZ6Ekf+3fgCfcT+r ieHXNzyWVuXjq9IMCgOvOOY= =qEB7 -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp-- --===============1015129618== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-gnu-emacs mailing list bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs --===============1015129618==--