From 2f12628e08b54608110c3b000dc78afec3779f2c Mon Sep 17 00:00:00 2001 From: Simon Marshall Date: Thu, 3 Nov 1994 15:30:39 +0000 Subject: [PATCH] Wrap font-lock-fontify-region's string-match with save-match-data. --- lisp/font-lock.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index a1b6df6537c..2b204bfedf8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -343,9 +343,10 @@ the face is also set; its value is the face name." ;; In C mode, it is " */" ;; and we don't want to fail to notice a */ ;; just because there's no space there. - (if (string-match "^ +" comment-end) - (substring comment-end (match-end 0)) - comment-end))) + (save-match-data + (if (string-match "^ +" comment-end) + (substring comment-end (match-end 0)) + comment-end)))) "\\s>")) (startline (point)) state prev prevstate) -- 2.39.5