emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug #25608 and the comment-cache branch


From: Stefan Monnier
Subject: Re: Bug #25608 and the comment-cache branch
Date: Sat, 18 Feb 2017 08:49:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> For syntax-ppss, two syntax tables are either `equal' or not.  There's
> probably no other useful standard of equivalence here.

You can also ignore difference between word/symbol/whitespace, I guess.
That would properly handle the common situation where the syntax-table
is changed during in font-lock to make all symbol-syntax chars into
word-syntax chars.
But I'm far from convinced it's worth the trouble.

>> I already suggested to fix the issue w.r.t point-min by replacing
>> syntax-ppss-cache with a table indexed by the value of point-min.
>> The same idea could be used for syntax-tables.  I.e. make
>> syntax-ppss-cache indexed by the combination of syntax-table and
>> point-min.
> We'd need to be careful not to fill up too much RAM with these caches,
> particularly for different values of point-min.

Given that it's flushed past any buffer modification and is only filled
lazily I'm not too worried.

Additionally, for multi-major-mode uses, the various "branches" of the
cache (each with a different point-min and syntax-table) would probably
end up with no overlap at all, so it wouldn't take up more space than now.
And with `with-temp-syntactic-context` the "other cache" would only
live temporarily.

> I'm not too keen on the "using a different point-min for some parsing"
> bit.  I suggest, again, using island-start and island-end syntactic

I say `point-min` because that's what we currently have.  What I mean by
that is "the logical beginning of the (sub)buffer".  So it could be
island-start, or prog-indentation-context, or ...


        Stefan




reply via email to

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