GNU bug report logs -
#35351
27.0.50; Enable derived modes to run their own very-early 'change-major-mode-hook' code
Previous Next
Full log
View this message in rfc822 format
> Yes, I think I like that least of all -- having the macro set up
> everything based on a different name to the mode that people are
> expected to be using just seems wrong to me.
I tend to view this as the fact that those "modes" should distinguish
between the mode and the command that invokes it, because that command
does more than setup the mode (e.g. it arranges to be able to go back
to the earlier modes).
E.g. in your case the mode could be called `so-long-mode` and the
command to enter it could be `so-long`.
> 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.
> 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.
Stefan
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.