summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTassilo Horn <tsdh@gnu.org>2023-02-10 19:22:56 +0100
committerTassilo Horn <tsdh@gnu.org>2023-02-10 19:22:56 +0100
commit4f053afe8e792c6261d4be0376e2ef0c91353188 (patch)
treeb326fcb1bdf0bb52f7337377ffecb5c1c32d1887
parent10af9fbcad107ae76f50d408e0d6d04e082cc6d8 (diff)
downloademacs-4f053afe8e792c6261d4be0376e2ef0c91353188.tar.gz
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).
-rw-r--r--lisp/progmodes/bug-reference.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 9f1439e6a04..bc280284588 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -174,7 +174,7 @@ subexpression 10."
(re-search-forward bug-reference-bug-regexp end-line 'move))
(when (or (not bug-reference-prog-mode)
;; 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))
(overlay (or
(let ((ov (pop overlays)))