bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25672: Font-locking issues when font-lock-fontified is nil


From: Lars Ingebrigtsen
Subject: bug#25672: Font-locking issues when font-lock-fontified is nil
Date: Wed, 30 Oct 2019 17:07:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Clément Pit--Claudel <clement.pitclaudel@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





reply via email to

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