emacs-devel
[Top][All Lists]
Advanced

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

Re: forward-comment and syntax-ppss


From: Stefan Monnier
Subject: Re: forward-comment and syntax-ppss
Date: Wed, 07 Dec 2016 21:32:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> Read up on bug #22983.  Basically, syntax-ppss is fundamentally broken.
> It won't work with narrowing of buffers, and delivers inconsistent
> results which aren't in accordance with what the function's doc says it
> does.  This breakage isn't anything that can be fixed.

> The only way to deal with it seems to be to remove syntax-ppss and
> replace it with a new function.

And how would the new function not face the same breakage that can't be
fixed?  As you should know, your comment-cache code suffers from the
exact same problem.  It's a fundamental problem in caching parsing data
in the face of narrowing, given the fact that our narrowing primitive
don't say what is the intention behind it.

If you think your comment-cache works well (i.e. you consider its
failures to be caused by inappropriate use of narrow-to-region), then it's
trivial to "fix" syntax-ppss in the same way: just put a `widen` in it
and voilà: "fundamentally broken" solved.


        Stefan




reply via email to

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