From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.bugs Subject: Re: CC Mode 5.28 (C); struct braces are not indented in GNU style Date: Thu, 30 Nov 2006 14:48:59 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164916167 6846 80.91.229.2 (30 Nov 2006 19:49:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2006 19:49:27 +0000 (UTC) Cc: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Thu Nov 30 20:49:25 2006 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gpru6-0001CS-Sj for sf-cc-mode-help@m.gmane.org; Thu, 30 Nov 2006 20:49:07 +0100 Original-Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 247DD13988; Thu, 30 Nov 2006 11:49:06 -0800 (PST) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1Gpru5-0006tr-2K for cc-mode-help@lists.sourceforge.net; Thu, 30 Nov 2006 11:49:05 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1Gpru4-0006i5-Pd for cc-mode-help@lists.sourceforge.net; Thu, 30 Nov 2006 11:49:05 -0800 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.52) id 1Gprtz-0006gD-Is; Thu, 30 Nov 2006 14:48:59 -0500 Original-To: John Darrington In-reply-to: (message from John Darrington on Wed, 29 Nov 2006 12:56:04 +0800) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:4152 gmane.emacs.bugs:15440 Archived-At: GNU coding standards say: "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" But given a code snippet like: struct foobar { int x; }; indent-region reformats it as: struct foobar { int x; }; which is contrary to the second clause of this sentence. The standards are too strict; sometimes it is useful for the struct defintion to be treated as a defun. 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. What do others think of that? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV