In batch mode or when font-lock and some other niceties are switched
off, function `syntax-ppss' can modify match data held by function
`beginning-of-defun-raw'. In that case, `beginning-of-defun' can jump
to some seemingly arbitrary position, and not the actual BOF.
* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Save match data
around a call to `syntax-ppss'. (Bug#66218)
"\\(?:" defun-prompt-regexp "\\)\\s(")
"^\\s(")
nil 'move arg))
- (nth 8 (syntax-ppss))))
+ (save-match-data
+ (nth 8 (syntax-ppss)))))
found)
(progn (goto-char (1- (match-end 0)))
t)))