Subject: bug#35351: 27.0.50; Enable derived modes to run their own very-early 'change-major-mode-hook' code

From: Phil Sainty <[email-masked]>
Date: Tue, 23 Apr 2019 11:18:31 +1200

On 23/04/19 2:39 AM, Stefan Monnier wrote:
>> I'm now unsure whether :after-hook was intended to be interpreted
>> as "this is a bit like a *hook* which runs *after* everything
>> else has happened"; or if it meant "do this thing *after* the
>> mode *hook*" (or indeed after after-change-major-mode-hook).
> 
> Oh, you're absolutely right, it's called ":after-hook" because it
> runs after the mode-hook.

Which means :before-hook definitely isn't a good name for the new
keyword.

Should I go with :eval-before ?

And should I add :eval-after as an alias for :after-hook, for naming
symmetry?  (Even if :after-hook makes better sense than you initially
thought, it's maybe still not the best name for it.)

>> In the initial commit I've used an approach which will run the
>> parent's :before-hook
> 
> That seems backward to me.
> 
>> Possibly it should be child-before-parent on the basis that the
>> author then has more influence over the order in which things
>> happen?
> 
> Exactly.

Cool.  I'm switching that around.

-Phil