GNU bug report logs -
#60543
29.0.60; c-ts-mode: Labels are not properly indented
Previous Next
Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Date: Wed, 4 Jan 2023 07:29:02 UTC
Severity: normal
Found in version 29.0.60
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Mohammed Sadiq <sadiq <at> sadiqpk.org> 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
This bug report was last modified 2 years and 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.