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

From: Stefan Monnier <[email-masked]>
Date: Wed, 10 Jan 2024 11:04:00 -0500

> I must be out of luck, because Eglot does need "the language" to send
> as the LSP "languageID" to the server.

No quite "the language": it needs "the language as defined by LSP (or by
its LSP server)".

FWIW, I view centralized mode-indexed databases like
`eglot-server-programs` generally as a "youth diseases": as a package
matures this gets replaced by buffer-local vars set by the respective
major modes.

Reminds me that maybe we should better label our major modes, so as to
distinguish a few different categories:
- `prog-mode` and `fundamental-mode`: "virtual modes" used for the sole
  purpose of sharing code between their children.
  They don't corresponding to any particular content type.
- `tuareg-mode`, `cperl-mode`, `foo-ts-mode`: "alternate modes".

This way, it might be easier to heuristically compute "the language" by
removing "-mode" from the non-"alternate", non-"virtual" mode(s) in
`derived-mode-all-parents`.

        Stefan