bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp

Align the js-ts-mode entry with the javascript-mode entries in the
default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is
not associated with .js files.

* lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp.

Fixes: 2023-01-20 6b2f85caa6 "Make tree-sitter based modes optional"
This commit is contained in:
Liam Hupfer 2025-06-25 22:47:34 -05:00 committed by Eli Zaretskii
parent 982938363a
commit 6299eb0fe5

View file

@ -3961,7 +3961,7 @@ See `treesit-thing-settings' for more information.")
(treesit-major-mode-setup)
(add-to-list 'auto-mode-alist
'("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode))))
'("\\(\\.js[mx]?\\|\\.har\\)\\'" . js-ts-mode))))
(derived-mode-add-parents 'js-ts-mode '(js-mode))