* wl-message.el (wl-message-buffer-prefetch-next): Don't call
authorhmurata <hmurata>
Mon, 11 Feb 2002 12:14:11 +0000 (12:14 +0000)
committerhmurata <hmurata>
Mon, 11 Feb 2002 12:14:11 +0000 (12:14 +0000)
`wl-message-buffer-prefetch-get-next' if FOLDER is not a target
for prefetch.

wl/ChangeLog
wl/wl-message.el

index d7da732..dbeb886 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-message.el (wl-message-buffer-prefetch-next): Don't call
+       `wl-message-buffer-prefetch-get-next' if FOLDER is not a target
+       for prefetch.
+
 2002-02-07  Kenichi OKADA  <okada@opaopa.org>
 
        * wl-summary.el (wl-summary-pick): Fix for no match.
index 1e6e31f..88102f4 100644 (file)
@@ -626,12 +626,14 @@ Returns non-nil if bottom of message."
 (defun wl-message-buffer-prefetch-next (folder number count
                                               &optional summary charset)
   (let* ((summary (or summary (get-buffer wl-summary-buffer-name)))
-        (next (wl-message-buffer-prefetch-get-next folder number summary)))
+        next)
     (when (and count
               (wl-message-buffer-prefetch-p folder))
-      (wl-message-buffer-prefetch-clear-timer)
-      (wl-message-buffer-prefetch-set-timer
-       folder next count summary charset))))
+      (setq next (wl-message-buffer-prefetch-get-next folder number summary))
+      (when next
+       (wl-message-buffer-prefetch-clear-timer)
+       (wl-message-buffer-prefetch-set-timer
+        folder next count summary charset)))))
 
 (defun wl-message-buffer-prefetch-subr (folder number count summary charset)
   (if (buffer-live-p summary)