* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
@ 2023-01-08 10:13 Mohammed Sadiq
2023-01-08 10:30 ` Mohammed Sadiq
2023-01-20 21:28 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 6+ messages in thread
From: Mohammed Sadiq @ 2023-01-08 10:13 UTC (permalink / raw)
To: 60649
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
2023-01-08 10:13 bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly Mohammed Sadiq
@ 2023-01-08 10:30 ` Mohammed Sadiq
2023-01-20 21:28 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 6+ messages in thread
From: Mohammed Sadiq @ 2023-01-08 10:30 UTC (permalink / raw)
To: 60649
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
2023-01-08 10:13 bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly Mohammed Sadiq
2023-01-08 10:30 ` Mohammed Sadiq
@ 2023-01-20 21:28 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 6:41 ` Mohammed Sadiq
1 sibling, 1 reply; 6+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-01-20 21:28 UTC (permalink / raw)
To: Mohammed Sadiq; +Cc: 60649
Mohammed Sadiq <sadiq@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
2023-01-20 21:28 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-01-21 6:41 ` Mohammed Sadiq
2023-01-21 7:49 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: Mohammed Sadiq @ 2023-01-21 6:41 UTC (permalink / raw)
To: Theodor Thornhill; +Cc: 60649
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
2023-01-21 6:41 ` Mohammed Sadiq
@ 2023-01-21 7:49 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 8:00 ` Mohammed Sadiq
0 siblings, 1 reply; 6+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-01-21 7:49 UTC (permalink / raw)
To: Mohammed Sadiq; +Cc: 60649
Mohammed Sadiq <sadiq@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly
2023-01-21 7:49 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-01-21 8:00 ` Mohammed Sadiq
0 siblings, 0 replies; 6+ messages in thread
From: Mohammed Sadiq @ 2023-01-21 8:00 UTC (permalink / raw)
To: Theodor Thornhill; +Cc: 60649
On 2023-01-21 13:19, Theodor Thornhill wrote:
> Mohammed Sadiq <sadiq@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. :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-21 8:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-08 10:13 bug#60649: 29.0.60; c-ts-mode: struct typedef brace end may not indent properly Mohammed Sadiq
2023-01-08 10:30 ` Mohammed Sadiq
2023-01-20 21:28 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 6:41 ` Mohammed Sadiq
2023-01-21 7:49 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 8:00 ` Mohammed Sadiq
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).