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

From: João Távora <[email-masked]>
Date: Thu, 4 Jan 2024 23:02:19 +0000

On Thu, Jan 4, 2024 at 10:12 PM Stefan Monnier via Bug reports for GNU
Emacs, the Swiss army knife of text editors <[email-masked]>
wrote:
>
> Package: Emacs
> Version: 30.0.50
>
>
> Many packages use the `major-mode` as a proxy for the type of content
> in the buffer.  When using the new TS modes, these packages tend to
> behave poorly because they do not understand that a buffer in `js-ts-mode`
> contains Javascript.
>
> I suggest we add the non-TS mode as an extra parent, so
> `derived-mode-all-parents` includes `js-mode` in `js-ts-mode`.

Hmmm, this would either mean stupendous and welcome
simplification in eglot-server-programs or horrible breakage
there.  Or maybe something in between :-)  Seems risky, so I
hope we give it adequate testing.  In a fair number of servers.
Can some Eglot user help me out here?

João