bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes


From: Stefan Monnier
Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes
Date: Mon, 08 Jan 2024 22:49:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> See commit 59f8c56d9e71a1b61ca8cc0794a6de4aa2f240e4
> So, it's nothing like Dmitry's idea:

Of course it is.

>> > Instead, we could have a mapping of files to "languages" and a separate one
>> > from languages to major modes.

`auto-mode-alist` maps from file names to languages/filetypes (where
"major-mode like" symbols are typically used to represent
languages/filetypes), and then `major-mode-remap-alist` maps from those
languages/filetypes to actual major modes.

Of course, if you want to use other symbols for the content types, that
works as well, e.g.:

    emacs --eval '(progn (add-to-list `auto-mode-alist `("\\.myf$" . 
text/html)) (add-to-list `major-mode-remap-alist `(text/html . html-mode)))' 
~/tmp/foo.myf


-- Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]