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

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 21 Apr 2019 02:41:01 UTC

Severity: wishlist

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 35351 <at> debbugs.gnu.org
Subject: bug#35351: 27.0.50; Enable derived modes to run their own very-early 'change-major-mode-hook' code
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




This bug report was last modified 6 years and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.