Lars Ingebrigtsen [2021-08-21 15:24 +0200] wrote: > Alan Mackenzie writes: > >> Emacs-28, emacs started with site-start.el and .emacs. >> >> On calling >> >> (parse-partial-sexp 19 18 nil nil s) >> >> Emacs surely ought to signal an error, since 18 < 19. It doesn't, >> though. It leaves point at a random position and returns >> >> (0 nil nil nil nil nil 0 nil nil nil nil) >> >> This is a bug. > > I've now made this change (and the doc string clarification discussed). > There are no test failures after the change, and I'm not getting any > errors when running it normally, either. Found one :). 0. emacs -Q 1. M-x toggle-debug-on-error RET 2. M-x ielm RET RET Debugger entered--Lisp error: (error "End position should be larger than start position.") parse-partial-sexp(# 64) ielm-return() funcall-interactively(ielm-return) call-interactively(ielm-return nil nil) command-execute(ielm-return) One option is to replace XFIXNUM with fix_position, which is what the subsequent validate_region also does. Another option is to CHECK_FIXNUM_COERCE_MARKER before the comparison. Any preference?