emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redundant (harmful) duplication of run-hooks in define-globalized-mi


From: Dmitry Gutov
Subject: Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode
Date: Mon, 14 Jan 2013 00:48:31 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Alan Mackenzie <address@hidden> writes:

> 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.

Sounds similar to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11929



reply via email to

[Prev in Thread] Current Thread [Next in Thread]