[Top][All Lists]

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

Re: Syntax ambiguities in narrowed buffers and multiple major modes: a p

From: Alan Mackenzie
Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution.
Date: Tue, 28 Feb 2017 20:27:20 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

Hello, Stefan.

On Tue, Feb 28, 2017 at 14:09:54 -0500, Stefan Monnier wrote:
> >> Yes, the state depends on where we start parsing.  But there is
> >> a privileged state which is the one rendered visible via font-lock, and
> >> that's the one syntax-ppss intends to cache.

> > That sounds like an intended resolution of the current ambiguity of the
> > starting position of syntax-ppss's cache.  Or am I reading too much into
> > the sentence?

> I think you're reading too much into it ;-)
> E.g. in order for font-lock to give the right result, we sometimes need
> to run it (and syntax-ppss) on an "island".

Just to emphasize, in my "island" scheme, the syntactic state by
starting "at the island" would be the same as starting at BOB.  Either
would work.  This should simplify the syntactic handling.

> > OK.  But any time the current syntax-table is changed, the cache becomes
> > invalid.  For such operations, there really needs to be a means of
> > isolating the cache from the syntactic operations, and vice versa.

> That's right.  But I think it's important to be able to *temporarily*
> invalidate the cache (so as soon as you leave the with-syntax-table,
> the old cache is reinstated).

I agree with you here.  I'll be thinking about it.

>         Stefan

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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