GNU bug report logs - #78548
29.4; js-ts-mode indentation issue for switch-case

Previous Next

Package: emacs;

Reported by: Fabrice Salvaire <fabrice.salvaire <at> orange.fr>

Date: Thu, 22 May 2025 12:36:02 UTC

Severity: normal

Found in version 29.4

To reply to this bug, email your comments to 78548 AT debbugs.gnu.org.

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#78548; Package emacs. (Thu, 22 May 2025 12:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fabrice Salvaire <fabrice.salvaire <at> orange.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 May 2025 12:36:02 GMT) Full text and rfc822 format available.

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

From: Fabrice Salvaire <fabrice.salvaire <at> orange.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.4; js-ts-mode indentation issue for switch-case
Date: Thu, 22 May 2025 14:35:18 +0200
[Message part 1 (text/plain, inline)]
Actually, Emacs indents this JavaScript code like this:

```

switch (foo) {

case bar:

    ....

}

```


In `js.el` : `js--treesit-indent-rules`, the line

`       ((parent-is ,switch-case) parent-bol 0)`

should be

`       ((node-is ,switch-case) parent-bol js-switch-indent-offset)`


There is also a lot of mixed tab/space indent in this file.

[Message part 2 (text/html, inline)]

This bug report was last modified 2 days ago.

Previous Next


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