[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Redundant (harmful) duplication of run-hooks in define-globalized-minor-
From: |
Alan Mackenzie |
Subject: |
Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode |
Date: |
Sun, 13 Jan 2013 19:28:54 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi, Emacs.
The situation here is the direct cause of bug #11152, where in CC Mode,
doc comments whose fontification is specified in a mode hook don't get
fontified properly, or at all. It would be good to fix this bug for
Emacs 24.3.
In define-globalized-minor-mode L72-75, the newly defined -enable-
function is added to both the following hooks:
change-major-mode-after-body-hook
after-change-major-mode-hook
. (These hooks are run before and after the major mode hook.)
It seems the hacker who formulated this macro was undecided whether to
run the -enable- function before or after the mode hooks, so decided
upon both as a compromise. This isn't harmless.
In particular, running `global-font-lock-mode-enable-in-buffers' before
the objc-mode-hook causes a one-time font-lock-keywords initialisation
to happen before a critical initialisation has been performed by that
hook.
Can some means be found so that `font-lock-mode' isn't called twice?
(For that matter, `global-hi-lock-mode-enable-in-buffers' doesn't need
calling twice, either.) Such a means might be the addition of another
parameter to define-globalized-minor-mode specifying when the -enable-
call should take place.
--
Alan Mackenzie (Nuremberg, Germany).
- Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode,
Alan Mackenzie <=
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode, Dmitry Gutov, 2013/01/13
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/14
- emacs24/auctex bug, Camm Maguire, 2013/01/14
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Stefan Monnier, 2013/01/14
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/15
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], João Távora, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Stefan Monnier, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], João Távora, 2013/01/18