emacs-devel
[Top][All Lists]
Advanced

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

Re: How to add pseudo vector types


From: Stefan Monnier
Subject: Re: How to add pseudo vector types
Date: Fri, 23 Jul 2021 16:28:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> > But that's how the current font-lock and indentation work: they never
>> > look beyond the narrowing limits.
>> Not quite: that's true for indentation, but for font-lock we have
>> `font-lock-dont-widen` (i.e. by default, font-lock widens temporarily
>> while it does its job).
> jit-lock never requests fontifications outside of the accessible
> portion, because redisplay doesn't look there.

But font-lock may look (and fontify) beyond the narrowing, and
when it calls `syntax-ppss` it will usually parse from 1 rather than
from `point-min`.

I'd expect jit/font-lock running on top of TS to behave similarly: the
actual parsing is done over the widened buffer but the fontification is
only applied to the visible part (or nearby).


        Stefan




reply via email to

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