summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorSimon Marshall <simon@gnu.org>1994-11-03 15:30:39 +0000
committerSimon Marshall <simon@gnu.org>1994-11-03 15:30:39 +0000
commit2e87ceb3cce4e4c1ef433cbd993173fd256d09a9 (patch)
treecc5bda9e273a6e7d3cde63563fe71a8963bc9fd8 /lisp/font-lock.el
parent4383d1aff04cf2355608a227a7f3ecbbcdff4467 (diff)
downloademacs-2e87ceb3cce4e4c1ef433cbd993173fd256d09a9.tar.gz
Wrap font-lock-fontify-region's string-match with save-match-data.
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el7
1 files 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)