GNU bug report logs - #60932
29.0.60; c-ts-mode: Fails to indent enum block emitting a warning

Previous Next

Package: emacs;

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

Date: Wed, 18 Jan 2023 14:10:02 UTC

Severity: normal

Found in version 29.0.60

Fixed in versions 30.1, 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 60932 in the body.
You can then email your comments to 60932 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#60932; Package emacs. (Wed, 18 Jan 2023 14:10: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. (Wed, 18 Jan 2023 14:10: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: Fails to indent enum block emitting a warning
Date: Wed, 18 Jan 2023 19:39:47 +0530
enums are not indented with select -> TAB, Example:

enum {
PROP_0,
PROP_NAME,
N_PROPS
};


When trying to indent, I get the following warning in *Messages*:
indent-line-to: Wrong type argument: wholenump, -2


In GNU Emacs 29.0.60 (build 8, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.16.0) of 2023-01-18 built on purism
Repository revision: 1798ff5a6636d6b34d23ab2dadb966e94cc57467
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#60932; Package emacs. (Fri, 20 Jan 2023 21:25:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 60932 <at> debbugs.gnu.org
Subject: Re: bug#60932: 29.0.60; c-ts-mode: Fails to indent enum block
 emitting a warning
Date: Fri, 20 Jan 2023 22:24:51 +0100
Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:

> enums are not indented with select -> TAB, Example:
>
> enum {
> PROP_0,
> PROP_NAME,
> N_PROPS
> };
>
>
> When trying to indent, I get the following warning in *Messages*:
> indent-line-to: Wrong type argument: wholenump, -2
>
>
> In GNU Emacs 29.0.60 (build 8, x86_64-pc-linux-gnu, GTK+ Version
>  3.24.36, cairo version 1.16.0) of 2023-01-18 built on purism
> Repository revision: 1798ff5a6636d6b34d23ab2dadb966e94cc57467
> Repository branch: emacs-29
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101005
> System Description: Debian GNU/Linux bookworm/sid


Thanks!

Should be fixed in latest master, closing this :)

Theo




bug Marked as fixed in versions 30.1. Request was from Theodor Thornhill <theo <at> thornhill.no> to control <at> debbugs.gnu.org. (Fri, 20 Jan 2023 21:26:02 GMT) Full text and rfc822 format available.

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

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

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 60932 <at> debbugs.gnu.org
Subject: Re: bug#60932: 29.0.60; c-ts-mode: Fails to indent enum block
 emitting a warning
Date: Sat, 21 Jan 2023 12:14:50 +0530
On 2023-01-21 02:54, Theodor Thornhill wrote:
> Should be fixed in latest master, closing this :)

Well, this should be fixed in emacs-29 branch too, right?
The warning has gone there, but enum indentation is still broken,

I get:

enum {
GTK_PAD_ACTION_BUTTON,
GTK_PAD_ACTION_RING,
GTK_PAD_ACTION_STRIP
} GtkPadActionType;

but I expect to get:

enum {
  GTK_PAD_ACTION_BUTTON,
  GTK_PAD_ACTION_RING,
  GTK_PAD_ACTION_STRIP
} GtkPadActionType;




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

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Cc: 60932 <at> debbugs.gnu.org
Subject: Re: bug#60932: 29.0.60; c-ts-mode: Fails to indent enum block
 emitting a warning
Date: Sat, 21 Jan 2023 08:48:14 +0100
Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:

> On 2023-01-21 02:54, Theodor Thornhill wrote:
>> Should be fixed in latest master, closing this :)
>
> Well, this should be fixed in emacs-29 branch too, right?
> The warning has gone there, but enum indentation is still broken,
>
> I get:
>
> enum {
> GTK_PAD_ACTION_BUTTON,
> GTK_PAD_ACTION_RING,
> GTK_PAD_ACTION_STRIP
> } GtkPadActionType;
>
> but I expect to get:
>
> enum {
>    GTK_PAD_ACTION_BUTTON,
>    GTK_PAD_ACTION_RING,
>    GTK_PAD_ACTION_STRIP
> } GtkPadActionType;


Sorry, my bad.  Applied to emacs-29 now.  Does it work for you now?

Theo




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

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

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 60932 <at> debbugs.gnu.org
Subject: Re: bug#60932: 29.0.60; c-ts-mode: Fails to indent enum block
 emitting a warning
Date: Sat, 21 Jan 2023 13:30:05 +0530
On 2023-01-21 13:18, Theodor Thornhill wrote:
> Sorry, my bad.  Applied to emacs-29 now.  Does it work for you now?

Yes it does, thanks for fixing.




bug marked as fixed in version 29.1, send any further explanations to 60932 <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, 21 Jan 2023 20:47:02 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, 19 Feb 2023 12:24:07 GMT) Full text and rfc822 format available.

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

Previous Next


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