--- Begin Message ---
Subject: |
29.0.60; javascript-mode → js-mode |
Date: |
Tue, 03 Jan 2023 20:12:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
It looks wrong to require from users to add mappings for both `js-mode'
and its alias `javascript-mode' to `major-mode-remap-alist':
(add-to-list 'major-mode-remap-alist '(js-mode . js-ts-mode))
(add-to-list 'major-mode-remap-alist '(javascript-mode . js-ts-mode))
Either `major-mode-remap-alist' could support aliases, or simpler
would be just to replace the alias in `auto-mode-alist':
diff --git a/lisp/files.el b/lisp/files.el
index c45c3d40a5d..2acc1d1df4a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2952,9 +2952,9 @@ auto-mode-alist
("\\.dbk\\'" . xml-mode)
("\\.dtd\\'" . sgml-mode)
("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
- ("\\.js[mx]?\\'" . javascript-mode)
+ ("\\.js[mx]?\\'" . js-mode)
;; https://en.wikipedia.org/wiki/.har
- ("\\.har\\'" . javascript-mode)
+ ("\\.har\\'" . js-mode)
("\\.json\\'" . js-json-mode)
("\\.[ds]?va?h?\\'" . verilog-mode)
("\\.by\\'" . bovine-grammar-mode)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#60526: 29.0.60; javascript-mode → js-mode |
Date: |
Sun, 08 Jan 2023 10:26:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> js-mode feels more like "implementation name" to me. After all, the name
> of the language is Javascript, not js. I think javascript-mode best
> represents "major mode for javascript", not js-mode, if you get what I
> mean.
Indeed, and the treesit module is named tree-sitter-javascript, not js.
So closing this report now.
--- End Message ---