emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: GNU bug Tracking System
Subject: bug#60526: closed (29.0.60; javascript-mode → js-mode)
Date: Sun, 08 Jan 2023 08:50:03 +0000

Your message dated Sun, 08 Jan 2023 10:26:13 +0200
with message-id <86sfglwhs3.fsf@mail.linkov.net>
and subject line Re: bug#60526: 29.0.60; javascript-mode → js-mode
has caused the debbugs.gnu.org bug report #60526,
regarding 29.0.60; javascript-mode → js-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60526: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60526
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]