GNU bug report logs -
#60526
29.0.60; javascript-mode → js-mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 3 Jan 2023 18:15:02 UTC
Severity: normal
Found in version 29.0.60
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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':
[javascript-ts-mode.patch (text/x-diff, inline)]
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)
This bug report was last modified 2 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.