[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: |
João Távora |
Subject: |
bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes |
Date: |
Tue, 9 Jan 2024 10:52:21 +0000 |
On Tue, Jan 9, 2024 at 3:49 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 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
OK, I get it. This form above is very elegant.
I had already understood the gist from Dmitry's email and if
more symbols are allowed there (notably symbols with names
matching the MIME type hierarchy), then I think it's mostly fine.
"Mostly" because of the fact that cdrs of entries in m-m-r-alist
are supposed to be functions and major-mode is a symbol, which
makes for brittle reverse lookups.
And then there's still the work of filling it in and changing
auto-mode-alist. This is mostly mechanical work though. I can
volunteer if this approach is validated.
Also, writing m-m-r-alist is not incompatible to passing a
:content-type keyword arg to define-derived-mode, which
I still think is the most natural way to maintain this
database.
João
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, (continued)
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes,
João Távora <=
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/09
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/10
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/10
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Kangas, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Kévin Le Gouguec, 2024/01/09
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/08
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/09
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/09