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

Full log


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 24 days ago.

Previous Next


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