emacs and C++ { } indenting
Jerry Feldman
gaf at blu.org
Wed Feb 25 14:13:59 EST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 25 Feb 2004 11:36:14 -0500 (EST)
David Kramer <david at thekramers.net> wrote:
> Emacs C++ mode seems to insist on K&R style indenting of brackets like
>
> void Foo:Bar(Baz myBaz) {
> // code here
> }
>
>
> I prefer the ANSI style like
>
> void Foo:Bar(Baz myBaz)
> {
> // code here
> }
>
I think this has been answered. While the first set of braces are K&R
style as they are used in the K&R books. The other two common styles:
void Foo:Bar(Baz myBaz)
{
// code here
}
and
void Foo:Bar(Baz myBaz)
{
// code here
}
Are just personal/professional styles.
BTW: K&R function style is:
void Foo:Bar(Baz myBaz)
{
// code here
}
But K&R if and while statement form is:
if (condition) {
// code
}
- --
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAPPP3+wA+1cUGHqkRAhEvAJ9HJi0ANIKBdrgmWCp3Qgo0tFeXJQCdHG66
C4u1at5yd5hoyK677JkTYZk=
=u4pf
-----END PGP SIGNATURE-----
More information about the Discuss
mailing list