From 1f14d57546ab3ec1069d0872efb0a086f492db91 Mon Sep 17 00:00:00 2001 From: okazaki Date: Mon, 12 Mar 2001 11:40:41 +0000 Subject: [PATCH] * wl-highlight.el (wl-highlight-summary): Use `save-match-data'. --- wl/wl-highlight.el | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 2a93f9f..f323e23 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -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. -- 1.7.10.4