Subject: Re: bug#28050: CC Mode 5.33 (C/*l); indentation of array and enum in GNU style isn't right
From: Alan Mackenzie <[email-masked]>
To: Mohammed Sadiq <[email-masked]>
Cc: [email-masked]
Date: Tue, 12 Mar 2019 19:16:54 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, Mohammed and Emacs.

I've just committed a fix to this bug to master.

On Fri, Aug 11, 2017 at 22:50:02 +0530, Mohammed Sadiq wrote:

> For the following code, the indentation of the code isn't right for GNU
> style (C-x h TAB after writing the code):

> /* Output after default (auto)indentation in GNU Emacs (TAB is used sometimes) */
> char *words[] = {
> 		 "good",
> 		 "better",
> 		 "best"
> };

> The GNU style is (as done by the program GNU indent):

> /* They should be indented with 2 spaces (and not TABs)
> char *words[] = {
>   "good",
>   "better",
>   "best"
> };

> Tabs are also add for indentation when defining enums:

> typedef enum {
> 	      GOOD,
> 	      BETTER,
> 	      BEST
> } test;

> The following might be better (2 spaces, and no TABs):

> typedef enum {
>   GOOD,
>   BETTER,
>   BEST
> } test;

> Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
>  of 2017-08-11
> Package: CC Mode 5.33 (C/*l)
> Buffer Style: gnu
> c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit)

-- 
Alan Mackenzie (Nuremberg, Germany).