[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71992: 30.0.60; major-mode-remap-alist doesn't work for combination
From: |
Jeremy Bryant |
Subject: |
bug#71992: 30.0.60; major-mode-remap-alist doesn't work for combination js-mode + js-ts-mode |
Date: |
Tue, 09 Jul 2024 21:35:41 +0100 |
Roman Rudakov <rrudakov@fastmail.com> writes:
> Dmitry Gutov <dmitry@gutov.dev> writes:
>
>> On 09/07/2024 00:37, Jeremy Bryant via Bug reports for GNU Emacs,
>> the
>> Swiss army knife of text editors wrote:
>>> Roman Rudakov<rrudakov@fastmail.com> writes:
>>>
>>>> 1. Evaluate: (setopt major-mode-remap-alist '((js-mode
>>>> . js-ts-mode)))
>>>> 2. C-x C-f ~/tmp.js
>>>>
>>>> Expected result:
>>>>
>>>> major-mode is js-ts-mode
>>>>
>>>> Actual result:
>>>>
>>>> major-mode is js-mode
>>>>
>>>>
>>>> In GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
>>>> appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-07-06 built on
>>>> Romans-MBP.home
>>>> Windowing system distributor 'Apple', version 10.3.2487
>>>> System Description: macOS 14.5
>>>>
>>> FWIW, I've been able to reproduce this bug report in 30.0.60 and
>>> 29.4
>>
>> The reason might be that its auto-mode-alist entry references
>> javascript-mode (and js-mode is made an alias in autoloads).
>
> Indeed, adding (javascript-mode . js-ts-mode) entry to
> major-mode-remap-alist solves the problem.
Thanks Dmitry
On that basis I'm closing the bug.