1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00

Fix recent parse-partial-sexp argument validation

* src/syntax.c (parse-partial-sexp): Also handle markers as
arguments (bug#49944).  Tweak error message to follow conventions in
"(elisp) Signaling Errors".
This commit is contained in:
Basil L. Contovounesios 2021-08-21 22:55:58 +01:00
parent 6c007668b3
commit ff2124d297

View file

@ -3595,8 +3595,8 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment.
else
target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */
if (XFIXNUM (to) < XFIXNUM (from))
error ("End position should be larger than start position.");
if (fix_position (to) < fix_position (from))
error ("End position is smaller than start position");
validate_region (&from, &to);
internalize_parse_state (oldstate, &state);