GNU bug report logs - #60543
29.0.60; c-ts-mode: Labels are not properly indented

Previous Next

Package: emacs;

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

From: Yuan Fu <casouri <at> gmail.com>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 60543 <at> debbugs.gnu.org
Subject: bug#60543: 29.0.60; c-ts-mode: Labels are not properly indented
Date: Sat, 7 Jan 2023 18:15:56 -0800
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.