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

From: Stefan Monnier <[email-masked]>
Date: Fri, 05 Jan 2024 23:16:06 -0500

> Then there is the problem Eli pointed out, base-mode hooks runs before child
> major mode body does.

[ Side note: This is not relevant to the present suggested patch.  ]

No, all the mode hooks are run at the end of the major mode body,
i.e. you get the following order:

   fundamental-mode body
   prog-mode body
   FOO-base-mode body
   FOO-ts-mode body
   fundamental-mode-hook
   prog-mode-hook
   FOO-base-mode-hook
   FOO-ts-mode-hook
   
> (Arguable a niche use-case, but my point is base-mode hooks have
> their limits.)

It was sufficiently "not niche" that I fixed that problem in Emacs-22
(according to `C-h v delay-mode-hooks`)  :-)

        Stefan