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

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

> The reordering is the side effect of calling validate_region, so we'd
> need to expend extra effort NOT to reorder START and END.
>
> How about just documenting that OLDSTATE should be the state at START,
> and that's it?

The current use of `validate_region` means that OLDSTATE will be used as
the state at "either FROM or TO, whichever is smaller".

So I don't understand what it is you're proposing: if we document 
that OLDSTATE should be the state at FROM, then we need to change the
code so that it never swaps FROM and TO.  And if we don't want to change
the code, then we should document that OLDSTATE will be used as the
state at TO when TO is smaller than FROM.

        Stefan