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: Tue, 03 Aug 2021 09:28:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> But that's sub-optimal, no?  Imagine a very large buffer which was
> narrowed to a small portion near EOB, then a modification made very
> close to EOB but partially before BEGV, then the buffer widened.  With
> your method, TS will now have to re-parse almost the entire buffer,
> whereas we know it needs to re-parse a very small portion of it.

As a general rule, we will most likely want to work hard to avoid
exposing the narrowed buffer to TS (i.e. most calls to TS will first
`widen`).

Or we will want to keep several parse trees (one per narrowing).

We have the same problem already with `syntax-ppss` which we solve by
keeping two sets of data (`syntax-ppss-wide` and `syntax-ppss-narrow`).


        Stefan




reply via email to

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