all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode
@ 2013-01-13 19:28 Alan Mackenzie
  2013-01-13 20:48 ` Dmitry Gutov
  2013-01-14 16:30 ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Alan Mackenzie
  0 siblings, 2 replies; 22+ messages in thread
From: Alan Mackenzie @ 2013-01-13 19:28 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-02-03 22:14 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13 19:28 Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode Alan Mackenzie
2013-01-13 20:48 ` Dmitry Gutov
2013-01-14 16:30 ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Alan Mackenzie
2013-01-14 16:52   ` emacs24/auctex bug Camm Maguire
2013-01-14 23:58     ` Xue Fuqiao
2013-01-15  2:12   ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Stefan Monnier
2013-01-15 14:08     ` Alan Mackenzie
2013-01-17 13:17       ` João Távora
2013-01-17 17:51         ` Alan Mackenzie
2013-01-17 18:31           ` Stefan Monnier
2013-01-18 12:07             ` João Távora
2013-01-18 17:09             ` Alan Mackenzie
2013-01-31 11:04             ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2] Alan Mackenzie
2013-01-31 14:38               ` Stefan Monnier
2013-02-01 15:44                 ` Alan Mackenzie
2013-02-01 16:28                   ` Stefan Monnier
2013-02-01 19:53                     ` Alan Mackenzie
2013-02-01 20:09                       ` Achim Gratz
2013-02-01 20:15                         ` Alan Mackenzie
2013-02-01 23:17                         ` Stefan Monnier
2013-02-01 23:16                       ` Stefan Monnier
2013-02-03 22:14                         ` Alan Mackenzie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.