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

From: Stefan Monnier <[email-masked]>
Date: Mon, 08 Jan 2024 22:55:27 -0500

> But for this to be useful to determine the language
> of a major mode via reverse lookup,

Define "the language".

The mapping from "language" to major mode can't be always reversible, so
`major-mode-remap-alist` works to map "language" to "major-mode" but not
the other way.

The current bug-report *is* about "finding the language" but the code
that needs that info luckily doesn't need "the language" it just needs
to know "does the current buffer contain language FOO", which is an
easier problem, which I propose to solve with `derived-mode-p`, since
that's what we've been using all these years.

        Stefan