From: Simon Marshall Date: Thu, 3 Nov 1994 15:30:39 +0000 (+0000) Subject: Wrap font-lock-fontify-region's string-match with save-match-data. X-Git-Tag: emacs-19.34~6041 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f12628e08b54608110c3b000dc78afec3779f2c;p=emacs.git Wrap font-lock-fontify-region's string-match with save-match-data. --- 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)