* wl-message.el (wl-message-buffer-prefetch-get-next): Use while
authorhmurata <hmurata>
Tue, 2 Apr 2002 12:11:53 +0000 (12:11 +0000)
committerhmurata <hmurata>
Tue, 2 Apr 2002 12:11:53 +0000 (12:11 +0000)
loop instead of recursive call.

wl/ChangeLog
wl/wl-message.el

index 5403a31..d64334e 100644 (file)
@@ -1,5 +1,8 @@
 2002-04-02  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
+       * wl-message.el (wl-message-buffer-prefetch-get-next): Use while
+       loop instead of recursive call.
+
        * wl-addrmgr.el (wl-addrmgr-quit-yes): Call get-buffer-window with
        2nd argument.
 
index 775758b..de5cc18 100644 (file)
@@ -593,20 +593,18 @@ Returns non-nil if bottom of message."
 (defun wl-message-buffer-prefetch-get-next (folder number summary)
   (if (buffer-live-p summary)
       (with-current-buffer summary
-       (let* ((wl-summary-move-spec-plugged-alist
-               (or wl-message-buffer-prefetch-move-spec-plugged-alist
-                   wl-summary-move-spec-plugged-alist))
-              (wl-summary-move-spec-unplugged-alist
-               (or wl-message-buffer-prefetch-move-spec-unplugged-alist
-                   wl-summary-move-spec-unplugged-alist))
-              (next (funcall wl-message-buffer-prefetch-get-next-function
-                             number)))
-         (if (and next
-                  (not (wl-message-buffer-prefetch-p folder next)))
-             ;; for Multi folder
-             (wl-message-buffer-prefetch-get-next
-              folder next summary)
-           next)))))
+       (let ((wl-summary-move-spec-plugged-alist
+              (or wl-message-buffer-prefetch-move-spec-plugged-alist
+                  wl-summary-move-spec-plugged-alist))
+             (wl-summary-move-spec-unplugged-alist
+              (or wl-message-buffer-prefetch-move-spec-unplugged-alist
+                  wl-summary-move-spec-unplugged-alist))
+             (next number))
+         (while (and (setq next (funcall
+                                 wl-message-buffer-prefetch-get-next-function
+                                 next))
+                     (not (wl-message-buffer-prefetch-p folder next))))
+         next))))
 
 (defun wl-message-buffer-prefetch (folder number count
                                          &optional summary charset)