emacs-devel
[Top][All Lists]
Advanced

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

Re: What's the best (i.e. least bad) way to re-redisplay?


From: Eli Zaretskii
Subject: Re: What's the best (i.e. least bad) way to re-redisplay?
Date: Thu, 26 Aug 2021 09:37:14 +0300

> Date: Wed, 25 Aug 2021 20:09:24 +0000
> From: Alan Mackenzie <acm@muc.de>
> Cc: emacs-devel@gnu.org
> 
> > I think something along the lines of
> 
> >     (run-with-timer 0 nil
> >                     (lambda (buf)
> >                       (with-current-buffer buf (font-lock-flush)))
> >                     (current-buffer))
> 
> > is the cleanest that comes to mind.
> 
> Thanks.  That's probably cleaner than a direct use of
> jit-lock-force-redisplay.

Why is it cleaner?  jit-lock and font-lock include provision for the
fontification function to tell jit-lock what was the region actually
fontified, and that will trigger a call to jit-lock-force-redisplay in
a timer.  Why not use an existing mechanism?



reply via email to

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