Subject: Re: bug#22983: syntax-ppss returns wrong result.

From: Dmitry Gutov <[email-masked]>
Date: Sun, 20 Mar 2016 01:20:13 +0200

On 03/20/2016 01:00 AM, Vitalie Spinu wrote:
>
> Thanks for this. This is a step in right direction IMHO.
>
> One side note. `parsep-ppss` has a condition-case for args-out-of-range which
> could be easily optimized out. You already know that you are calling
> parse-partial-sexp with out of range arguments if narrowing is in place.

That seems like it might make the code more complex: there are several 
parse-partial-sexp calls inside condition-case (for different situations 
with the existing cache), and we may have to add a comparison near each 
of them.

> The
> current error check obfuscates the logic and makes debugging harder. Would it be
> possible for you to have a look once you are on it? Not a big deal though.

I think you can still follow the execution flow with edebug, can't you?

If you're debugging a problem with args-out-of-range, another option is 
to replace `condition-case' with `condition-case-unless-debug' and 
re-evaluate the definition (but restore it when you're done, otherwise 
the args-out-of-range handler won't fire, I think).