From: Liam Hupfer Date: Thu, 26 Jun 2025 03:47:34 +0000 (-0500) Subject: bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=815c59dacdd6c71efcf23c824d263f8636a8c90b;p=emacs.git 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 6b2f85caa6ca "Make tree-sitter based modes optional" (cherry picked from commit 6299eb0fe54c87bcbb0f6ab4de3e4f9e250d4586) --- diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index ec7c2602d33..d96e3ada49a 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4103,7 +4103,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))