[Top][All Lists]

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

bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock

From: Stefan Monnier
Subject: bug#14886: Fwd: bug#14886: Fwd: A significant slowdown calling font-lock-fontify-buffer from a hook
Date: Wed, 24 Jul 2013 21:24:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> - Font-lock-fontify-buffer should not be called from a hook.

Font-lock-fontify-buffer is definitely a bad function, since it has
2 different meanings (either "make sure the buffer is fontified" or
"please refontify the buffer").  It should be replaced by two different
- font-lock-ensure-fontification, which makes sure fontification is
  applied to a particular region (e.g. for use by things like
  htmlfontify or ps-print).
- font-lock-flush-fontification which indicates that the fontification
  for a particular region should be considered out-of-date (e.g. for use
  after calling font-lock-add/remove-keywords).
I don't see why any of those 3 functions shouldn't be called from
a hook, tho.
> - Errors during fontification should be visible.  That would have made
> clear that there was something wrong with the 24.3 use case.

Silent errors are bugs.  Please try and find what happens with
the error message.


reply via email to

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