Subject: bug#49944: parse-partial-sexp fails to signal an error when (> START LIMIT).

From: Stefan Monnier <[email-masked]>
Date: Tue, 10 Aug 2021 11:07:38 -0400

Lars Ingebrigtsen [2021-08-10 16:54:59] wrote:
> But I guess you'll get incorrect results if you pass in any OLDSTATE
> that doesn't belong to START, not just when START and END are swapped?

If the caller needs to know whether swapping will take place in order to
pass the right OLDSTATE, then it defeats the purpose of swapping (which
is presumably to make life easier for the caller).

> So perhaps signalling an error here is the correct thing after all?
> (Or just not doing any swapping.)

I don't have an opinion on signaling an error or not, but swapping is
a bad idea here IMO.

        Stefan