|
From: | Dmitry Gutov |
Subject: | bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes |
Date: | Tue, 9 Jan 2024 03:09:08 +0200 |
User-agent: | Mozilla Thunderbird |
On 09/01/2024 02:10, Stefan Monnier wrote:
Instead, we could have a mapping of files to "languages" and a separate one from languages to major modes.Indeed. I called this one `major-mode-remap-alist`. 🙂
Good point. I think it's unfortunate that it isn't used more.The good side is that even if "languages" are introduced, this var won't necessarily need renaming.
Perhaps we should have entries like ("\\.js\\'" . 'js-lang) in auto-mode-alist and then map the symbol to the specific major mode in major-mode-remap-alist. But for this to be useful to determine the language of a major mode via reverse lookup, all/most programming language modes will need to be featured there, rather than this being optional and used only for custom overrides.
[Prev in Thread] | Current Thread | [Next in Thread] |