GNU bug report logs - #60649
29.0.60; c-ts-mode: struct typedef brace end may not indent properly

Previous Next

Package: emacs;

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

Date: Sun, 8 Jan 2023 10:15:02 UTC

Severity: normal

Found in version 29.0.60

Fixed in version 29.1

Done: Theodor Thornhill <theo <at> thornhill.no>

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 60649 in the body.
You can then email your comments to 60649 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#60649; Package emacs. (Sun, 08 Jan 2023 10:15: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. (Sun, 08 Jan 2023 10:15: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: struct typedef brace end may not indent properly
Date: Sun, 08 Jan 2023 15:43:42 +0530
The following code is not indented properly with c-ts-mode:

typedef struct {
  unsigned long flags;
  unsigned long functions;
  unsigned long decorations;
  long input_mode;
  unsigned long status;
        } PropMotifWmHints;


the expected indentation:

typedef struct {
  unsigned long flags;
  unsigned long functions;
  unsigned long decorations;
  long input_mode;
  unsigned long status;
} PropMotifWmHints;



In GNU Emacs 29.0.60 (build 9, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.16.0) of 2023-01-08 built on purism
Repository revision: e04b3d41bb41ccca3d403345b12b9a614213d488
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101005
System Description: Debian GNU/Linux bookworm/sid




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60649; Package emacs. (Sun, 08 Jan 2023 10:31:01 GMT) Full text and rfc822 format available.

Message #8 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: Re: 29.0.60; c-ts-mode: struct typedef brace end may not indent
 properly
Date: Sun, 08 Jan 2023 16:00:22 +0530
The same is the case for typedef enum too, eg:
typedef enum {
  GTK_PAD_ACTION_BUTTON,
  GTK_PAD_ACTION_RING,
  GTK_PAD_ACTION_STRIP
        } GtkPadActionType;




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60649; Package emacs. (Fri, 20 Jan 2023 21:29:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 60649 <at> debbugs.gnu.org
Subject: Re: bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not
 indent properly
Date: Fri, 20 Jan 2023 22:28:05 +0100
Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:

> The following code is not indented properly with c-ts-mode:
>
> typedef struct {
>   unsigned long flags;
>   unsigned long functions;
>   unsigned long decorations;
>   long input_mode;
>   unsigned long status;
>         } PropMotifWmHints;
>
>
> the expected indentation:
>
> typedef struct {
>   unsigned long flags;
>   unsigned long functions;
>   unsigned long decorations;
>   long input_mode;
>   unsigned long status;
> } PropMotifWmHints;
>

It seems to me that both of these are fixed now, right?

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60649; Package emacs. (Sat, 21 Jan 2023 06:42:02 GMT) Full text and rfc822 format available.

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

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 60649 <at> debbugs.gnu.org
Subject: Re: bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not
 indent properly
Date: Sat, 21 Jan 2023 12:11:02 +0530
On 2023-01-21 02:58, Theodor Thornhill wrote:
> It seems to me that both of these are fixed now, right?

enum block has still broken indentation, I get:

typedef enum {
GTK_PAD_ACTION_BUTTON,
GTK_PAD_ACTION_RING,
GTK_PAD_ACTION_STRIP
        } GtkPadActionType;


But I expect (with default indentation level):

typedef enum {
  GTK_PAD_ACTION_BUTTON,
  GTK_PAD_ACTION_RING,
  GTK_PAD_ACTION_STRIP
} GtkPadActionType;





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60649; Package emacs. (Sat, 21 Jan 2023 07:50:01 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 60649 <at> debbugs.gnu.org
Subject: Re: bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not
 indent properly
Date: Sat, 21 Jan 2023 08:49:15 +0100
Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:

> On 2023-01-21 02:58, Theodor Thornhill wrote:
>> It seems to me that both of these are fixed now, right?
>
> enum block has still broken indentation, I get:
>
> typedef enum {
> GTK_PAD_ACTION_BUTTON,
> GTK_PAD_ACTION_RING,
> GTK_PAD_ACTION_STRIP
>          } GtkPadActionType;
>
>
> But I expect (with default indentation level):
>
> typedef enum {
>    GTK_PAD_ACTION_BUTTON,
>    GTK_PAD_ACTION_RING,
>    GTK_PAD_ACTION_STRIP
> } GtkPadActionType;


Now all of this works on emacs-29 for me, do you agree? :)

```
enum {
  PROP_0,
  PROP_NAME,
  N_PROPS
};

typedef enum {
  GTK_PAD_ACTION_BUTTON,
  GTK_PAD_ACTION_RING,
  GTK_PAD_ACTION_STRIP
} GtkPadActionType;

typedef struct {
  unsigned long flags;
  unsigned long functions;
  unsigned long decorations;
  long input_mode;
  unsigned long status;
} PropMotifWmHints;


typedef enum {
  GTK_PAD_ACTION_BUTTON,
  GTK_PAD_ACTION_RING,
  GTK_PAD_ACTION_STRIP
} GtkPadActionType;
```

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60649; Package emacs. (Sat, 21 Jan 2023 08:01:02 GMT) Full text and rfc822 format available.

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

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 60649 <at> debbugs.gnu.org
Subject: Re: bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not
 indent properly
Date: Sat, 21 Jan 2023 13:30:50 +0530
On 2023-01-21 13:19, Theodor Thornhill wrote:
> Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:
> 
>> On 2023-01-21 02:58, Theodor Thornhill wrote:
>>> It seems to me that both of these are fixed now, right?
>> 
>> enum block has still broken indentation, I get:
>> 
>> typedef enum {
>> GTK_PAD_ACTION_BUTTON,
>> GTK_PAD_ACTION_RING,
>> GTK_PAD_ACTION_STRIP
>>          } GtkPadActionType;
>> 
>> 
>> But I expect (with default indentation level):
>> 
>> typedef enum {
>>    GTK_PAD_ACTION_BUTTON,
>>    GTK_PAD_ACTION_RING,
>>    GTK_PAD_ACTION_STRIP
>> } GtkPadActionType;
> 
> 
> Now all of this works on emacs-29 for me, do you agree? :)


Yes. It works fine now. :)




bug marked as fixed in version 29.1, send any further explanations to 60649 <at> debbugs.gnu.org and Mohammed Sadiq <sadiq <at> sadiqpk.org> Request was from Theodor Thornhill <theo <at> thornhill.no> to control <at> debbugs.gnu.org. (Sat, 28 Jan 2023 19:10:01 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. (Sun, 26 Feb 2023 12:24:06 GMT) Full text and rfc822 format available.

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

Previous Next


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