[Top][All Lists]

[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: Sat, 10 Dec 2016 19:24:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> It's better in one sense and worse in another. Since parse-partial-sexp
> can't parse backwards, you're leaving a whole range of values of POS on
> which syntax-ppss will have to just raise an error.

I don't think it's a big deal: such a situation would necessarily be an
error elsewhere, so signaling an error would be the right thing to do anyway.
Admittedly, an alternative would be to provide syntax-ppss with a bunch
of "forced data", i.e. an alist of (POS . STATE) where syntax-ppss
should start parsing from the nearest earlier POS and use the
corresponding STATE as starting state.  But it's probably not worth
the trouble (and might even be slightly problematic for (syntax-ppss
POS) since some callers would want it to return STATE while others might
like to know "the state computed from the earlier POS&STATE").


reply via email to

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