GNU bug report logs -
#79025
Indention falls apart when using C23 type feature on enum
Previous Next
To reply to this bug, email your comments to 79025 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79025
; Package
emacs
.
(Tue, 15 Jul 2025 12:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Marcel Weißenbach <mweissenbach <at> ikaros.space>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 15 Jul 2025 12:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello there,
i assume something simple but
This here does work just fine
typedef enum _IgePlayerState {
IGE_PLAYER_STATE_MOVEABLE,
IGE_PLAYER_STATE_WHATVER,
}
This here no longer works
typedef enum _IgePlayerState : Uint8 {
IGE_PLAYER_STATE_MOVEABLE,
IGE_PLAYER_STATE_WHATVER,
}
Best Regards
Marcel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79025
; Package
emacs
.
(Tue, 15 Jul 2025 13:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79025 <at> debbugs.gnu.org (full text, mbox):
On Tue, 15 Jul 2025 04:07:48 +0000 Marcel Weißenbach <mweissenbach <at> ikaros.space> wrote:
> Hello there,
>
> i assume something simple but
>
> This here does work just fine
>
> typedef enum _IgePlayerState {
> IGE_PLAYER_STATE_MOVEABLE,
> IGE_PLAYER_STATE_WHATVER,
> }
>
> This here no longer works
>
> typedef enum _IgePlayerState : Uint8 {
> IGE_PLAYER_STATE_MOVEABLE,
> IGE_PLAYER_STATE_WHATVER,
> }
I see the bad indentation (and also bad fontification) in latter example
with c-mode in emacs-30, but in current master the indentation (and
fontification) are the same as in the first example.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79025
; Package
emacs
.
(Tue, 15 Jul 2025 13:58:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 79025 <at> debbugs.gnu.org (full text, mbox):
> From: Marcel Weißenbach <mweissenbach <at> ikaros.space>
> Date: Tue, 15 Jul 2025 04:07:48 +0000
>
> i assume something simple but
>
> This here does work just fine
>
> typedef enum _IgePlayerState {
> IGE_PLAYER_STATE_MOVEABLE,
> IGE_PLAYER_STATE_WHATVER,
> }
>
> This here no longer works
>
> typedef enum _IgePlayerState : Uint8 {
> IGE_PLAYER_STATE_MOVEABLE,
> IGE_PLAYER_STATE_WHATVER,
> }
>
>
>
I cannot reproduce this. In what version of Emacs did you try it, and
with what major mode?
IOW, would you mind providing a detailed recipe, starting from "emacs -Q",
and telling us which version of Emacs are you using and on what OS?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79025
; Package
emacs
.
(Wed, 16 Jul 2025 07:19:04 GMT)
Full text and
rfc822 format available.
Message #14 received at 79025 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"Eli Zaretskii" eliz <at> gnu.org – 2025年7月15日 22:57
> > From: Marcel Weißenbach <mweissenbach <at> ikaros.space>
> > Date: Tue, 15 Jul 2025 04:07:48 +0000
> >
> > i assume something simple but
> >
> > This here does work just fine
> >
> > typedef enum _IgePlayerState {
> > IGE_PLAYER_STATE_MOVEABLE,
> > IGE_PLAYER_STATE_WHATVER,
> > }
> >
> > This here no longer works
> >
> > typedef enum _IgePlayerState : Uint8 {
> > IGE_PLAYER_STATE_MOVEABLE,
> > IGE_PLAYER_STATE_WHATVER,
> > }
> >
> >
> >
>
> I cannot reproduce this. In what version of Emacs did you try it, and
> with what major mode?
>
> IOW, would you mind providing a detailed recipe, starting from "emacs -Q",
> and telling us which version of Emacs are you using and on what OS?
>
>
Hi there, thanks for the fast reply.
I am using Emacs 30.1 on Gentoo or better said, i just started using Emacs, so the error might be on my side as i am an very beginner.
All i do is type "emacs ." in the directory of the source and then select the .c (or .h) file and start working on it.
I attached the file that triggers this for me. When i go inside the enum and press tab in the later elements, it starts to indent them. I also attached my config.
When i remove the : Uint8, it no longer indents them.
[player.h (text/x-chdr, attachment)]
[init.el (text/x-emacs-lisp, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79025
; Package
emacs
.
(Wed, 16 Jul 2025 07:19:05 GMT)
Full text and
rfc822 format available.
Message #17 received at 79025 <at> debbugs.gnu.org (full text, mbox):
"Stephen Berman" stephen.berman <at> gmx.net – 2025年7月15日 22:35
> On Tue, 15 Jul 2025 04:07:48 +0000 Marcel Weißenbach <mweissenbach <at> ikaros.space> wrote:
>
> > Hello there,
> >
> > i assume something simple but
> >
> > This here does work just fine
> >
> > typedef enum _IgePlayerState {
> > IGE_PLAYER_STATE_MOVEABLE,
> > IGE_PLAYER_STATE_WHATVER,
> > }
> >
> > This here no longer works
> >
> > typedef enum _IgePlayerState : Uint8 {
> > IGE_PLAYER_STATE_MOVEABLE,
> > IGE_PLAYER_STATE_WHATVER,
> > }
>
> I see the bad indentation (and also bad fontification) in latter example
> with c-mode in emacs-30, but in current master the indentation (and
> fontification) are the same as in the first example.
>
> Steve Berman
>
>
Thanks for your reply too!
FYI, i discovered the c-guess feature which i ran over my biggest C File and it did produce an style that works exactly how i want it to work including C23 typed enums.
That is an more as good workaround for me, so i am in no hurry
Best Regards
Marcel
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Wed, 16 Jul 2025 11:14:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Marcel Weißenbach <mweissenbach <at> ikaros.space>
:
bug acknowledged by developer.
(Wed, 16 Jul 2025 11:14:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 79025-done <at> debbugs.gnu.org (full text, mbox):
> From: Marcel Weißenbach <mweissenbach <at> ikaros.space>
> Cc: 79025 <at> debbugs.gnu.org
> Date: Tue, 15 Jul 2025 15:08:42 +0000
>
> "Eli Zaretskii" eliz <at> gnu.org – 2025年7月15日 22:57
> > > From: Marcel Weißenbach <mweissenbach <at> ikaros.space>
> > > Date: Tue, 15 Jul 2025 04:07:48 +0000
> > >
> > > i assume something simple but
> > >
> > > This here does work just fine
> > >
> > > typedef enum _IgePlayerState {
> > > IGE_PLAYER_STATE_MOVEABLE,
> > > IGE_PLAYER_STATE_WHATVER,
> > > }
> > >
> > > This here no longer works
> > >
> > > typedef enum _IgePlayerState : Uint8 {
> > > IGE_PLAYER_STATE_MOVEABLE,
> > > IGE_PLAYER_STATE_WHATVER,
> > > }
> > >
> > >
> > >
> >
> > I cannot reproduce this. In what version of Emacs did you try it, and
> > with what major mode?
> >
> > IOW, would you mind providing a detailed recipe, starting from "emacs -Q",
> > and telling us which version of Emacs are you using and on what OS?
> >
> >
>
> Hi there, thanks for the fast reply.
>
> I am using Emacs 30.1 on Gentoo or better said, i just started using Emacs, so the error might be on my side as i am an very beginner.
>
> All i do is type "emacs ." in the directory of the source and then select the .c (or .h) file and start working on it.
>
> I attached the file that triggers this for me. When i go inside the enum and press tab in the later elements, it starts to indent them. I also attached my config.
>
> When i remove the : Uint8, it no longer indents them.
Thanks. As Stephen says, this problem is already fixed on the master
branch of the Emacs Git repository, which will eventually become Emacs
31. So it means we already fixed this problem for the future versions
of Emacs.
I'm therefore closing this bug.
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.