emacs-devel
[Top][All Lists]
Advanced

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

Re: Major modes using `widen' is a good, even essential, programming pra


From: Eli Zaretskii
Subject: Re: Major modes using `widen' is a good, even essential, programming practice.
Date: Mon, 08 Aug 2022 05:29:45 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Gregory Heytings <gregory@heytings.org>,  emacs-devel@gnu.org
> Date: Sun, 07 Aug 2022 19:21:32 -0400
> 
> Eli Zaretskii [2022-08-07 17:20:52] wrote:
> > jit-lock calls the functions with two arguments, BEG and END, and
> > expects them to work only on that chunk of text.
> 
> That is not the case: it expects the function to "fontify" *at least*
> from BEG to END, but is quite happy to let it fontify more (and the
> function can return a value indicating which portion was actually
> returned in that case).  Furthermore, it's clear that fontification of
> BEG..END may need to look at text before BEG (and occasionally beyond
> END as well).

The intent is clearly that fontifications don't look far beyond these
two points, because otherwise the whole design of jit-lock and its
invocations during redisplay is basically thrown out the window.



reply via email to

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