From 6239294a00385f89d5fe1be871dc9d13f07741ff Mon Sep 17 00:00:00 2001 From: teranisi Date: Sun, 26 May 2002 13:13:44 +0000 Subject: [PATCH] * wl-highlight.el (wl-highlight-summary): Added optional `lazy' argument and when it is non-nil, check face property before highlighting for each line. (wl-highlight-summary-window): Set it. --- wl/ChangeLog | 7 +++++++ wl/wl-highlight.el | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index ebab707..290da80 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-05-26 Yuuichi Teranishi + + * wl-highlight.el (wl-highlight-summary): Added optional `lazy' + argument and when it is non-nil, check face property before + highlighting for each line. + (wl-highlight-summary-window): Set it. + 2002-05-22 Yuuichi Teranishi * wl-vars.el (wl-draft-disable-bcc-for-mime-bcc): New user option. diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index e10e270..4391cf5 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -954,7 +954,7 @@ Variables used: (interactive) (wl-highlight-summary (point-min)(point-max))) -(defun wl-highlight-summary (start end) +(defun wl-highlight-summary (start end &optional lazy) "Highlight summary between start and end. Faces used: wl-highlight-summary-unread-face unread messages @@ -984,9 +984,11 @@ Variables used: (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 (or (not lazy) + (null (get-text-property (point) 'face))) + (wl-highlight-summary-current-line nil nil + (or wl-summary-lazy-highlight + wl-summary-scored))) (forward-line 1)) (unless wl-summary-lazy-highlight (message "Highlighting...done"))))) @@ -998,10 +1000,8 @@ This function is defined for `window-scroll-functions'" (with-current-buffer (window-buffer win) (when (eq major-mode 'wl-summary-mode) (wl-highlight-summary (window-start win) - (save-excursion - (goto-char (window-start win)) - (forward-line (frame-height)) - (point))) + (window-end win) + 'lazy) (set-buffer-modified-p nil))))) (defun wl-highlight-headers (&optional for-draft) -- 1.7.10.4