unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60526: 29.0.60; javascript-mode → js-mode
@ 2023-01-03 18:12 Juri Linkov
  2023-01-03 20:21 ` Eli Zaretskii
  2023-01-08  1:39 ` Yuan Fu
  0 siblings, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2023-01-03 18:12 UTC (permalink / raw)
  To: 60526

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

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':


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: javascript-ts-mode.patch --]
[-- Type: text/x-diff, Size: 571 bytes --]

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)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-08 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03 18:12 bug#60526: 29.0.60; javascript-mode → js-mode Juri Linkov
2023-01-03 20:21 ` Eli Zaretskii
2023-01-04  6:40   ` Yuan Fu
2023-01-04  7:45     ` Juri Linkov
2023-01-08  1:39 ` Yuan Fu
2023-01-08  8:26   ` Juri Linkov
2023-01-08 11:07   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).