]> git.eshelyaron.com Git - emacs.git/commitdiff
Wrap font-lock-fontify-region's string-match with save-match-data.
authorSimon Marshall <simon@gnu.org>
Thu, 3 Nov 1994 15:30:39 +0000 (15:30 +0000)
committerSimon Marshall <simon@gnu.org>
Thu, 3 Nov 1994 15:30:39 +0000 (15:30 +0000)
lisp/font-lock.el

index a1b6df6537c07bb9ef4329fd9e03ba5312e51201..2b204bfedf83927b83b55008c04b1ccbde17c676 100644 (file)
@@ -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)