bug-reference: prevent match-data clobbering (bug#61395)

* lisp/progmodes/bug-reference.el (bug-reference-fontify): Wrap call
to syntax-ppss in save-match-data since it can clobber our
match-data (bug#61395).
This commit is contained in:
Tassilo Horn 2023-02-10 19:22:56 +01:00
parent 10af9fbcad
commit 4f053afe8e

View file

@ -174,7 +174,7 @@ subexpression 10."
(re-search-forward bug-reference-bug-regexp end-line 'move)) (re-search-forward bug-reference-bug-regexp end-line 'move))
(when (or (not bug-reference-prog-mode) (when (or (not bug-reference-prog-mode)
;; This tests for both comment and string syntax. ;; This tests for both comment and string syntax.
(nth 8 (syntax-ppss))) (nth 8 (save-match-data (syntax-ppss))))
(let* ((bounds (bug-reference--overlay-bounds)) (let* ((bounds (bug-reference--overlay-bounds))
(overlay (or (overlay (or
(let ((ov (pop overlays))) (let ((ov (pop overlays)))