emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2399541: Remove font-lock toggle from font-lock-update


From: Paul W. Rankin
Subject: Re: master 2399541: Remove font-lock toggle from font-lock-update
Date: Thu, 25 Mar 2021 01:29:50 +1000

> On 25 Mar 2021, at 1:23 am, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> +(defun font-lock-update ()
>> +  "Refontify the accessible portion of the buffer.
>> +Unconditionally activate `font-lock-mode'."
>> +  (interactive)
>> +  (unless font-lock-mode (font-lock-mode 1))
>>   (save-excursion
>> +    (font-lock-fontify-region (point-min) (point-max))))
> 
> I don't see which part of the code corresponds to "the accessible portion of".
> AFAICT this will forcefully fontify the whole buffer which takes quite
> a while on src/xdisp.c (for example).

True, I mentioned this earlier with reference to var `font-lock-dont-widen'. 
I'm just using at least some of the docstring from the previous command I'm 
coming down on here. Ideally this would be called something like 
`font-lock-force-update' with a more accurate docstring.


reply via email to

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