From: hmurata Date: Fri, 23 Nov 2001 03:23:12 +0000 (+0000) Subject: * wl-vars.el (wl-message-buffer-prefetch-folder-type-list): New X-Git-Tag: wl-2_8-root~125 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208b88d316e0de6689043b3062e43f03db6be0fe;p=elisp%2Fwanderlust.git * 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'. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6ab2d41..bd54ae4 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,18 @@ +2001-11-23 Hiroya Murata + + * 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 * wl-draft.el (wl-draft-config-sub-func-alist): Added diff --git a/wl/wl-message.el b/wl/wl-message.el index cde7f31..971715f 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -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 diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 805a93e..9c611e2 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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)" diff --git a/wl/wl-vars.el b/wl/wl-vars.el index ca00dba..7d7b337 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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.