GNU bug report logs - #61398
29.0.60; c-ts-mode: '}' indented wrong if '{' pair is in line with '='

Previous Next

Package: emacs;

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

Date: Fri, 10 Feb 2023 06:24: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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Yuan Fu <casouri <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#61398: closed (29.0.60; c-ts-mode: '}' indented wrong if '{'
 pair is in line with '=')
Date: Mon, 13 Feb 2023 03:52:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 12 Feb 2023 19:51:02 -0800
with message-id <FF170FEB-D1C6-4293-8317-B7F3AE37B960 <at> gmail.com>
and subject line Re: bug#61398: 29.0.60; c-ts-mode: '}' indented wrong if '{' pair  is in line with '='
has caused the debbugs.gnu.org bug report #61398,
regarding 29.0.60; c-ts-mode: '}' indented wrong if '{' pair is in line with '='
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
61398: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61398
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; c-ts-mode: '}' indented wrong if '{' pair is in line with '='
Date: Fri, 10 Feb 2023 11:53:42 +0530
The closing '};' is indented wrong in the following array definition:

const char *emoticons[][2] = {
  {":)", "🙂"},
  {";)", "😉"},
  {":(", "🙁"},
  };

The expected indentation:

const char *emoticons[][2] = {
  {":)", "🙂"},
  {";)", "😉"},
  {":(", "🙁"},
};


The issue is not limited to arrays, but also types like structs.


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


[Message part 3 (message/rfc822, inline)]
From: Yuan Fu <casouri <at> gmail.com>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 61398-done <at> debbugs.gnu.org
Subject: Re: bug#61398: 29.0.60; c-ts-mode: '}' indented wrong if '{' pair  is
 in line with '='
Date: Sun, 12 Feb 2023 19:51:02 -0800
Yuan Fu <casouri <at> gmail.com> writes:

> Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:
>
>> The closing '};' is indented wrong in the following array definition:
>>
>> const char *emoticons[][2] = {
>>   {":)", "🙂"},
>>   {";)", "😉"},
>>   {":(", "🙁"},
>>   };
>>
>> The expected indentation:
>>
>> const char *emoticons[][2] = {
>>   {":)", "🙂"},
>>   {";)", "😉"},
>>   {":(", "🙁"},
>> };
>
> I see, this problem is due to priorities between indentations rules.
> Should be easy to fix.
>
> Yuan

Ok, this should be fixed now.

Yuan


This bug report was last modified 2 years and 97 days ago.

Previous Next


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