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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 08 Aug 2021 20:14:25 +0200

Alan Mackenzie <[email-masked]> writes:

> On calling
>
>     (parse-partial-sexp 19 18 nil nil s)

(What's `s' here?)

> Emacs surely ought to signal an error, since 18 < 19.

It's common for Emacs functions that take a region to not care about
whether to is larger than from or not.  The

  validate_region (&from, &to);

function fixes it up.

> It doesn't,
> though.  It leaves point at a random position and returns
>
>     (0 nil nil nil nil nil 0 nil nil nil nil)

For me it leaves point at 19.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no