[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: |
Stefan Kangas |
Subject: |
bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes |
Date: |
Fri, 5 Jan 2024 10:43:11 -0800 |
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> 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`.
We should probably also change *Help* to displays the extra parents, or
this will be pretty confusing. It should probably both list it as a
parent mode, and say that it will run the corresponding hook.
Here's an example:
(progn
(define-derived-mode python-super-mode prog-mode "SuperPython" "Doc")
(derived-mode-add-parents 'python-super-mode '(python-mode))
(describe-function 'python-super-mode))
- 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, Yuan Fu, 2024/01/05
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Dmitry Gutov, 2024/01/05
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Stefan Monnier, 2024/01/05
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, Yuan Fu, 2024/01/07
- bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes, João Távora, 2024/01/06
- 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, Eli Zaretskii, 2024/01/05
bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes,
Stefan Kangas <=