* wl-highlight.el (wl-highlight-summary-window): Re-calculate the
authorkaoru <kaoru>
Wed, 18 Jun 2003 19:05:13 +0000 (19:05 +0000)
committerkaoru <kaoru>
Wed, 18 Jun 2003 19:05:13 +0000 (19:05 +0000)
end of the window if possible.

wl/ChangeLog
wl/wl-highlight.el

index 9c3622b..df3ba02 100644 (file)
@@ -1,5 +1,8 @@
 2003-06-18  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
+       * wl-highlight.el (wl-highlight-summary-window): Re-calculate the
+       end of the window if possible.
+
        * wl-vars (wl-delete-folder-alist,): Change default value.
        (wl-folder-hierarchy-access-folders): Ditto.
 
index c24b04b..eea611c 100644 (file)
@@ -991,13 +991,18 @@ Variables used:
 (defun wl-highlight-summary-window (&optional win beg)
   "Highlight summary window.
 This function is defined for `window-scroll-functions'"
-  (if wl-summary-highlight
-      (with-current-buffer (window-buffer win)
-       (when (eq major-mode 'wl-summary-mode)
-         (wl-highlight-summary (window-start win)
-                               (window-end win)
-                               'lazy)
-         (set-buffer-modified-p nil)))))
+  (when wl-summary-highlight
+    (with-current-buffer (window-buffer win)
+      (when (eq major-mode 'wl-summary-mode)
+       (let ((start (window-start win))
+             (end (condition-case nil
+                      (window-end win t) ;; old emacsen doesn't support 2nd arg.
+                    (error (window-end win)))))
+         (wl-highlight-summary start
+                               end
+                               'lazy))
+       (set-buffer-modified-p nil)))))
+
 
 (defun wl-highlight-headers (&optional for-draft)
   (let ((beg (point-min))
@@ -1098,8 +1103,7 @@ interpreted as cited text.)"
        (real-end end)
        current  beg
        e p hend)
-    (if too-big
-       nil
+    (unless too-big
       (save-excursion
        (save-restriction
          (widen)