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
Message #17 received at 60526 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>>>> - ("\\.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 is basically a no-brainer, but we had javascript-mode there for
>>> quite some time, and it's too late to change that for Emacs 29.
>>> Please install on master.
>>
>> I thought auto-mode-alist should use the canonical name and
>> major-mode-remap-alist maps the canonical name to the actual mode.
>
> But the canonical name is js-mode, because javascript-mode is
> an alias to js-mode.
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.
>> Why do we need
>>
>>>> (add-to-list 'major-mode-remap-alist '(js-mode . js-ts-mode))
>>
>> if auto-mode-alist uses javascript-mode?
>
> This is needed for the case when users or packages customized
> auto-mode-alist to use the name js-mode.
If they customize auto-mode-alist to js-mode, I expect them to expect
Emacs to use js-mode by default, not the tree-sitter mode.
Yuan
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.