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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 05 Jan 2024 09:40:17 +0200

> Cc: [email-masked]
> Date: Thu, 04 Jan 2024 17:11:14 -0500
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 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`.

If it works well, it's a good simplification, IMO.

But this patch is IMO incomplete:

  . it should modify our .dir-locals.el and Eglot's database to remove
    special entries for TS modes
  . it should add the recommendation to consider using this to the
    "Major Mode Convention" node of the ELisp manual