]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix recent parse-partial-sexp argument validation
authorBasil L. Contovounesios <contovob@tcd.ie>
Sat, 21 Aug 2021 21:55:58 +0000 (22:55 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sun, 22 Aug 2021 22:52:23 +0000 (23:52 +0100)
* src/syntax.c (parse-partial-sexp): Also handle markers as
arguments (bug#49944).  Tweak error message to follow conventions in
"(elisp) Signaling Errors".

src/syntax.c

index adc0da730ea12353b529ff59db3f6b61763d90a3..057a4c3b1f502825b3c05d07b167981105de9fb3 100644 (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);