GNU bug report logs - #61315
29.0.60; c-ts-mode: 'else if' block indentation is broken

Previous Next

Package: emacs;

Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>

Date: Mon, 6 Feb 2023 06:25:01 UTC

Severity: normal

Found in version 29.0.60

Fixed in version 29.1

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61315 in the body.
You can then email your comments to 61315 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61315; Package emacs. (Mon, 06 Feb 2023 06:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mohammed Sadiq <sadiq <at> sadiqpk.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 06 Feb 2023 06:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; c-ts-mode: 'else if' block indentation is broken
Date: Mon, 06 Feb 2023 11:53:55 +0530
The following code indentation is broken:

int
main(void)
{
  if (a)
    {
      do_something();
    }
  else if (b)
    {
	do_something_else();
    }
}

Where do_something_else(); statement is indented more than it should be.
afair this seems to a recent regression.


In GNU Emacs 29.0.60 (build 14, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.16.0) of 2023-02-06 built on purism
Repository revision: 79ab62e0bb5d6185a358a2473c65b6461ea97793
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101006
System Description: Debian GNU/Linux bookworm/sid




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61315; Package emacs. (Tue, 07 Feb 2023 02:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 61315 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 61315 <at> debbugs.gnu.org
Subject: Re: bug#61315: 29.0.60; c-ts-mode: 'else if' block indentation is 
 broken
Date: Mon, 6 Feb 2023 18:25:19 -0800
Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:

> The following code indentation is broken:
>
> int
> main(void)
> {
>   if (a)
>     {
>       do_something();
>     }
>   else if (b)
>     {
> 	do_something_else();
>     }
> }
>
> Where do_something_else(); statement is indented more than it should be.
> afair this seems to a recent regression.

This is the indentation I get:

int
main(void)
{
  if (a)
    {
      do_something();
    }
  else if (b)
    {
	  do_something_else();
    }
}

Is that not what it should be?

Yuan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61315; Package emacs. (Tue, 07 Feb 2023 02:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 61315 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 61315 <at> debbugs.gnu.org
Subject: Re: bug#61315: 29.0.60; c-ts-mode: 'else if' block indentation is 
 broken
Date: Mon, 6 Feb 2023 18:31:14 -0800
Yuan Fu <casouri <at> gmail.com> writes:

> Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:
>
>> The following code indentation is broken:
>>
>> int
>> main(void)
>> {
>>   if (a)
>>     {
>>       do_something();
>>     }
>>   else if (b)
>>     {
>> 	do_something_else();
>>     }
>> }
>>
>> Where do_something_else(); statement is indented more than it should be.
>> afair this seems to a recent regression.
>
> This is the indentation I get:
>
> int
> main(void)
> {
>   if (a)
>     {
>       do_something();
>     }
>   else if (b)
>     {
> 	  do_something_else();
>     }
> }
>
> Is that not what it should be?

My bad, I didn’t push the change I recently made. I just pushed them.

Yuan




bug marked as fixed in version 29.1, send any further explanations to 61315 <at> debbugs.gnu.org and Mohammed Sadiq <sadiq <at> sadiqpk.org> Request was from Yuan Fu <casouri <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 19 Feb 2023 20:58:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Mar 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.