From: Richard Stallman <rms@gnu.org>
Cc: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org
Subject: Re: CC Mode 5.28 (C); struct braces are not indented in GNU style
Date: Thu, 30 Nov 2006 14:48:59 -0500 [thread overview]
Message-ID: <E1Gprtz-0006gD-Is@fencepost.gnu.org> (raw)
In-Reply-To: <E1GpHUK-000140-Lc@pc-188> (message from John Darrington on Wed, 29 Nov 2006 12:56:04 +0800)
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
next prev parent reply other threads:[~2006-11-30 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 4:56 CC Mode 5.28 (C); struct braces are not indented in GNU style John Darrington
2006-11-30 19:48 ` Richard Stallman [this message]
2006-12-14 2:20 ` John Darrington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Gprtz-0006gD-Is@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=bug-cc-mode@gnu.org \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.