* wl-vars.el (wl-message-buffer-prefetch-folder-type-list): New
authorhmurata <hmurata>
Fri, 23 Nov 2001 03:23:12 +0000 (03:23 +0000)
committerhmurata <hmurata>
Fri, 23 Nov 2001 03:23:12 +0000 (03:23 +0000)
user option (Renamed from wl-cache-prefetch-folder-type-list).
(wl-message-buffer-prefetch-folder-list): New user option (Renamed
from wl-cache-prefetch-folder-list).

* wl-message.el (wl-message-buffer-prefetch-folder-type-list):
Move to wl-vars.el.
(wl-message-buffer-prefetch-p): Changed to enable
`wl-message-buffer-prefetch-folder-list'.

* wl-summary.el (wl-summary-prefetch-region): Added argument
`ignore-cache'.

wl/ChangeLog
wl/wl-message.el
wl/wl-summary.el
wl/wl-vars.el

index 6ab2d41..bd54ae4 100644 (file)
@@ -1,3 +1,18 @@
+2001-11-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-vars.el (wl-message-buffer-prefetch-folder-type-list): New
+       user option (Renamed from wl-cache-prefetch-folder-type-list).
+       (wl-message-buffer-prefetch-folder-list): New user option (Renamed
+       from wl-cache-prefetch-folder-list).
+
+       * wl-message.el (wl-message-buffer-prefetch-folder-type-list):
+       Move to wl-vars.el.
+       (wl-message-buffer-prefetch-p): Changed to enable
+       `wl-message-buffer-prefetch-folder-list'.
+
+       * wl-summary.el (wl-summary-prefetch-region): Added argument
+       `ignore-cache'.
+
 2001-11-23  Kenichi OKADA  <okada@opaopa.org>
 
        * wl-draft.el (wl-draft-config-sub-func-alist): Added
index cde7f31..971715f 100644 (file)
@@ -47,8 +47,6 @@
 (defvar wl-message-buffer-prefetch-get-next-function
   'wl-summary-default-get-next-msg)
 
-(defvar wl-message-buffer-prefetch-folder-type-list t)
-
 (defvar wl-message-buffer-prefetch-debug nil)
 
 (defvar wl-message-buffer nil) ; message buffer.
@@ -532,24 +530,25 @@ Returns non-nil if bottom of message."
       (setq buffer-read-only t))))
 
 (defsubst wl-message-buffer-prefetch-p (folder &optional number)
-  (cond 
-   ((eq wl-message-buffer-prefetch-folder-type-list t)
-    t)
-   ((and number wl-message-buffer-prefetch-folder-type-list)
-    (memq (elmo-folder-type-internal
-          (elmo-message-folder folder number))
-         wl-message-buffer-prefetch-folder-type-list))
-   (wl-message-buffer-prefetch-folder-type-list
-    (let ((list wl-message-buffer-prefetch-folder-type-list)
-         type)
-      (catch 'done
-       (while (setq type (pop list))
-         (if (elmo-folder-contains-type folder type)
-             (throw 'done t))))))
-   ((consp wl-message-buffer-prefetch-folder-type-list)
-    (wl-string-match-member (elmo-folder-name-internal folder)
-                           wl-message-buffer-prefetch-folder-type-list))
-   (t wl-message-buffer-prefetch-folder-type-list)))
+  (or (cond
+       ((eq wl-message-buffer-prefetch-folder-type-list t)
+       t)
+       ((and number wl-message-buffer-prefetch-folder-type-list)
+       (memq (elmo-folder-type-internal
+              (elmo-message-folder folder number))
+             wl-message-buffer-prefetch-folder-type-list))
+       (wl-message-buffer-prefetch-folder-type-list
+       (let ((list wl-message-buffer-prefetch-folder-type-list)
+             type)
+         (catch 'done
+           (while (setq type (pop list))
+             (if (elmo-folder-contains-type folder type)
+                 (throw 'done t)))))))
+      (cond
+       ((consp wl-message-buffer-prefetch-folder-list)
+       (wl-string-match-member (elmo-folder-name-internal folder)
+                               wl-message-buffer-prefetch-folder-list))
+       (t wl-message-buffer-prefetch-folder-list))))
 
 (defvar wl-message-buffer-prefetch-timer nil)
 
@@ -585,7 +584,7 @@ Returns non-nil if bottom of message."
                                                      number message-id)))
              (let* ((size (elmo-message-field folder number 'size)))
                (when (or (elmo-message-file-p folder number)
-                         (not 
+                         (not
                           (and (integerp size)
                                elmo-message-fetch-threshold
                                (>= size
index 805a93e..9c611e2 100644 (file)
@@ -3791,8 +3791,8 @@ If ARG, exit virtual folder."
              (delq (car mlist) wl-summary-buffer-target-mark-list))
        (setq mlist (cdr mlist))))))
 
-(defun wl-summary-target-mark-prefetch ()
-  (interactive)
+(defun wl-summary-target-mark-prefetch (&optional ignore-cache)
+  (interactive "P")
   (save-excursion
     (let* ((mlist (nreverse wl-summary-buffer-target-mark-list))
           (inhibit-read-only t)
@@ -3803,7 +3803,7 @@ If ARG, exit virtual folder."
           skipped
           new-mark)
       (while mlist
-       (setq new-mark (wl-summary-prefetch-msg (car mlist)))
+       (setq new-mark (wl-summary-prefetch-msg (car mlist) ignore-cache))
        (if new-mark
            (progn
              (message "Prefetching... %d/%d message(s)"
index ca00dba..7d7b337 100644 (file)
@@ -1636,19 +1636,24 @@ See also variable `wl-summary-next-no-unread-command'."
   :group 'wl-pref
   :group 'wl-setting)
 
-(defcustom wl-cache-prefetch-folder-type-list '(imap4 nntp)
+(defcustom wl-message-buffer-prefetch-folder-type-list t
   "*All folder types that match this list prefetch next message,
 and reserved buffer cache."
-  :type '(set (const localdir)
-             (const localnews)
-             (const imap4)
-             (const nntp)
-             (const pop3)
-             (const archive)
-             (const internal))
+  :type '(choice (const :tag "all" t)
+                (const :tag "never" nil)
+                (set (const localdir)
+                     (const localnews)
+                     (const maildir)
+                     (const imap4)
+                     (const nntp)
+                     (const pop3)
+                     (const shimbun)
+                     (const nmz)
+                     (const archive)
+                     (const internal)))
   :group 'wl-pref)
 
-(defcustom wl-cache-prefetch-folder-list nil
+(defcustom wl-message-buffer-prefetch-folder-list nil
   "*All folders that match this list prefetch next message,
 and reserved buffer cache.
 e.x.