Subject: bug#60543: 29.0.60; c-ts-mode: Labels are not properly indented

From: Yuan Fu <[email-masked]>
Date: Sat, 7 Jan 2023 18:15:56 -0800

Mohammed Sadiq <[email-masked]> writes:

> With the default "gnu" style, labels are not properly indented.
>
> Eg., for the following code:
>
> int
> main (void)
> {
> end:
>   clean ();
> }
>
>
> I expect to get the following indentation for "end:" (single space
> before "end" for "gnu" style, and no indentation for "linux" style):
>
> int
> main (void)
> {
>  end:
>   clean ();
> }

After reading the manual for GNU indent, I think Linux style asks for
indenting labels to column 1, not the GNU style. And c-ts-mode’s current
GNU style indentation agrees with GNU indent.

So I only added a rule to indent labels to column 1 in Linux style. Feel
free to correct me, of course.

Yuan