Subject: bug#60526: closed (Re: bug#60526: 29.0.60; javascript-mode→ js-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 08 Jan 2023 08:50:04 +0000

Your bug report

#60526: 29.0.60; javascript-mode → js-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60526: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60526
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60526: 29.0.60; javascript-mode → js-mode
From: Juri Linkov <[email-masked]>
To: Yuan Fu <[email-masked]>
Cc: [email-masked], Eli Zaretskii <[email-masked]>, [email-masked]
Date: Sun, 08 Jan 2023 10:26:13 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> 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.

Subject: 29.0.60; javascript-mode → js-mode
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Tue, 03 Jan 2023 20:12:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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)