GNU bug report logs - #68246
30.0.50; Add non-TS mode as extra parent of TS modes

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 4 Jan 2024 22:12:01 UTC

Severity: wishlist

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 68246 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, casouri <at> gmail.com, João Távora <joaotavora <at> gmail.com>
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
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.




This bug report was last modified 1 year and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.