[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-mode and mode hooks.
From: |
Luc Teirlinck |
Subject: |
Re: org-mode and mode hooks. |
Date: |
Wed, 25 May 2005 11:24:12 -0500 (CDT) |
Stefan Monnier wrote:
While I think that org-mode should use define-derived-mode, I'm wondering
why it's a problem that after-change-major-mode-hook is run at the
wrong time.
Because users of after-change-major-mode-hook should be able to rely
on the fact that it is run at the very end of the mode. Hooks should
be run as documented.
>From `(elisp)Mode Hooks':
-- Variable: after-change-major-mode-hook
Every major mode function should run this normal hook at its very
end. It normally does not need to do so explicitly. Indeed, a
major mode function should normally run its mode hook with
`run-mode-hooks' as the very last thing it does and
`run-mode-hooks' runs `after-change-major-mode-hook' at its very
end.
After all, such manual mode derivation (without using
define-derived-mode) is pretty common, so if there's a problem with it, we
should fix it.
I believe that we plan to eventually make all modes run
`after-change-major-mode-hook', usually as a byproduct of making them
run their mode hook with `run-mode-hooks'. If we see one that does
not, we fix it. In the meantime, if we use `after-change-mode-hook'
in a very general way, we need some fallback for modes that do not yet
use it.
Sincerely,
Luc.
- org-mode and mode hooks., Lute Kamstra, 2005/05/25
- Re: org-mode and mode hooks., Stefan Monnier, 2005/05/25
- Re: org-mode and mode hooks., Carsten Dominik, 2005/05/25
- Re: org-mode and mode hooks., Lute Kamstra, 2005/05/25
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/25
- Re: org-mode and mode hooks., Lute Kamstra, 2005/05/25
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/25
- Re: org-mode and mode hooks., Lute Kamstra, 2005/05/25
- Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/25
Re: org-mode and mode hooks.,
Luc Teirlinck <=
Re: org-mode and mode hooks., Richard Stallman, 2005/05/26
Re: org-mode and mode hooks., Juri Linkov, 2005/05/27
Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/25
Re: org-mode and mode hooks., Luc Teirlinck, 2005/05/25