emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The indentation of `enum' in the default `gnu' CC Mode style is wrong.


From: Alan Mackenzie
Subject: The indentation of `enum' in the default `gnu' CC Mode style is wrong.
Date: Mon, 3 Mar 2014 21:26:26 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Emacs.

This was pointed out recently by Xue Fuqiao on bug-cc-mode.

Emacs indents enum definitions as follows:

enum cardsuit
  {
    SPADES,
    HEARTS,
    DIAMONDS,
    CLUBS
  };

.  This is wrong.  According to the GNU Coding Standards chapter
"Formatting Your Source Code", the braces should be in column zero, just
like they are for structs and unions.

This bug goes back into ancient history.  As far as I can make out, it
was introduced into CC Mode on 1993-12-21.

My feeling about this is that the bug should not be fixed, since it
would likely cause creeping indentation changes throughout the GNU code
base for years to come.  What do other people think?

It goes to show how seriously people take coding standards.  ;-).

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]