* wl-highlight.el (wl-highlight-summary): Use `save-match-data'.
authorokazaki <okazaki>
Mon, 12 Mar 2001 11:40:41 +0000 (11:40 +0000)
committerokazaki <okazaki>
Mon, 12 Mar 2001 11:40:41 +0000 (11:40 +0000)
wl/wl-highlight.el

index 2a93f9f..f323e23 100644 (file)
@@ -994,28 +994,29 @@ Variables used:
       (let ((s start)) (setq start end end s)))
   (let (lines too-big gc-message e p hend i percent)
     (save-excursion
-      (unless wl-summary-lazy-highlight
-       (setq lines (count-lines start end)
-             too-big (and wl-highlight-max-summary-lines
-                          (> lines wl-highlight-max-summary-lines))))
-      (goto-char start)
-      (setq i 0)
-      (while (and (not (eobp))
-                 (< (point) end))
-       (wl-highlight-summary-current-line nil nil
-                                          (or wl-summary-lazy-highlight
-                                              wl-summary-scored))
-       (when (and (not wl-summary-lazy-highlight)
-                  (> lines elmo-display-progress-threshold))
-         (setq i (+ i 1))
-         (setq percent (/ (* i 100) lines))
-         (if (or (zerop (% percent 5)) (= i lines))
-             (elmo-display-progress
-              'wl-highlight-summary "Highlighting..."
-              percent)))
-       (forward-line 1))
-      (unless wl-summary-lazy-highlight
-       (message "Highlighting...done")))))
+      (save-match-data
+       (unless wl-summary-lazy-highlight
+         (setq lines (count-lines start end)
+               too-big (and wl-highlight-max-summary-lines
+                            (> lines wl-highlight-max-summary-lines))))
+       (goto-char start)
+       (setq i 0)
+       (while (and (not (eobp))
+                   (< (point) end))
+         (wl-highlight-summary-current-line nil nil
+                                            (or wl-summary-lazy-highlight
+                                                wl-summary-scored))
+         (when (and (not wl-summary-lazy-highlight)
+                    (> lines elmo-display-progress-threshold))
+           (setq i (+ i 1))
+           (setq percent (/ (* i 100) lines))
+           (if (or (zerop (% percent 5)) (= i lines))
+               (elmo-display-progress
+                'wl-highlight-summary "Highlighting..."
+                percent)))
+         (forward-line 1))
+       (unless wl-summary-lazy-highlight
+         (message "Highlighting...done"))))))
 
 (defun wl-highlight-summary-window (&optional win beg)
   "Highlight summary window.