emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-pp


From: Dmitry Gutov
Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
Date: Wed, 12 Feb 2014 06:24:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 12.02.2014 03:30, Stefan Monnier wrote:
One option is to have a hook that takes a (POS . PPSS) pair, which
syntax-ppss intends to use as a starting point for parsing, and return
a new such pair to use instead, where the returned position should
always be >= POS.

A problem: suppose point is in a primary mode region, and POS is in a submode region above it. Then we can't use the value of PPSS at all.
Does the hook re-scan the buffer from the beginning?

On 12.02.2014 04:49, Dmitry Gutov wrote:
We call `syntax-ppss', happily report to it that the value at point (or
some position near it) can be used until point + 400. Then move a few
chars lower and delete the rest of the given region. NEXT-BOUNDARY
becomes stale, and calling `syntax-ppss' from the region below can
return a wrong value.

I suppose this could be handled if `syntax-ppss-flush-cache' removed or modified the cache entries where NEXT-BOUNDARY is after BEG. And by modified, I mean set NEXT-BOUNDARY to BEG.



reply via email to

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