bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#22983: [ Patch ] Re: bug#22983: syntax-ppss returns wrong result.


From: Stefan Monnier
Subject: bug#22983: [ Patch ] Re: bug#22983: syntax-ppss returns wrong result.
Date: Mon, 11 Sep 2017 16:20:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> difficult, I agree, but do we need it?  How often are there going to be
> nested or alternating narrowing with enough calls to syntax-ppss to
> cause the establishment of syntax-ppss-cache (as opposed to merely
> syntax-ppss-last, which my patch doesn't consider sufficient reason to
> store a new narrow-cache)?  (These aren't rhetorical questions, by the
> way, but real ones.  Which is the best way forward?)

I agree that it probably doesn't make much difference in practice.

> I couldn't agree more.  However, syntax-ppss is established and there
> are callers that depend on its literal specification.  Maybe a way
> forward would be to introduce a new function equivalent to
> (parse-partial-sexp 1 x) and deprecate syntax-ppss.  However, a name
> would need to be found for this new function, not an easy task.  ;-)
> (syntax-ppss is a very good name, but couldn't be reused.)

Let's go with your patch for now, and then see if Dmitry's impression
that adding a call to `widen` before the call works even better.


        Stefan





reply via email to

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