GNU bug report logs -
#25672
Font-locking issues when font-lock-fontified is nil (Was: What to do when font-lock-flush + font-lock-ensure do less than font-lock-fontify-buffer? on emacs-devel)
Previous Next
Full log
Message #8 received at 25672 <at> debbugs.gnu.org (full text, mbox):
Clément Pit--Claudel <clement.pitclaudel <at> live.com> writes:
> Eli remarked the following:
>
>> However, please explain why font-lock-ensure-function calls
>> font-lock-DEFAULT-fontify-buffer. If it's supposed to be good for
>> any mode, why
>> does it call the default fontification?
>>
>> As a matter of fact, if I replace the font-lock-default-fontify-buffer
>> call with a call to font-lock-fontify-buffer, the problem described by
>> the OP goes away. That is why I said what I said.
>
> And Stefan answered:
>
>> I haven't seen the beginning of the thread, but if that fixes the
>> problem, then I think it's a good change.
>>
>> To go back to the previous question. I guess I used
>> font-lock-default-fontify-buffer because the whole point is to get rid
>> of all the misuses of font-lock-fontify-buffer, but I think in this case
>> it's indeed the right thing to do.
I think this was fixed last year-ish if I'm reading the change log
correctly.
Currently, font-lock-ensure calls the value of
font-lock-ensure-function, which has a default value of
(lambda (beg end)
(unless font-lock-fontified
(save-excursion
(font-lock-fontify-region beg end))))
If global-font-lock-mode is on, it's jit-lock-fontify-now.
So I think this now works better, and I'm closing this bug report. If
this is still an issue, please reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.