From 6f1993df390517e34ddbeb5fa894e047a672e457 Mon Sep 17 00:00:00 2001 From: okada Date: Sat, 19 Jan 2002 12:11:04 +0000 Subject: [PATCH] * wl-vars.el (wl-message-buffer-prefetch-depth): Default is 3. wl.el (wl-check-variables): Rename from `wl-check-type'. (wl-check-variables-alist): Rename from `wl-check-type-variables'. (wl-check-variables-2): New function. (wl): Call `wl-check-variables-2'. --- wl/ChangeLog | 8 ++++++++ wl/wl-message.el | 1 + wl/wl-vars.el | 2 +- wl/wl.el | 19 +++++++++++++++---- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 176ff94..e279c47 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2002-01-19 Kenichi OKADA + + * wl-vars.el (wl-message-buffer-prefetch-depth): Default is 3. + wl.el (wl-check-variables): Rename from `wl-check-type'. + (wl-check-variables-alist): Rename from `wl-check-type-variables'. + (wl-check-variables-2): New function. + (wl): Call `wl-check-variables-2'. + 2002-01-19 Yoichi NAKAYAMA * wl-fldmgr.el (wl-fldmgr-rename): Fixed around message appear diff --git a/wl/wl-message.el b/wl/wl-message.el index 26e1f51..ad257ce 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -559,6 +559,7 @@ Returns non-nil if bottom of message." (when (sit-for wl-message-buffer-prefetch-idle-time) (wl-message-buffer-prefetch folder next count summary charset)) + (setq wl-message-buffer-prefetch-timer nil) (unless wl-message-buffer-prefetch-timer (setq wl-message-buffer-prefetch-timer (run-with-idle-timer diff --git a/wl/wl-vars.el b/wl/wl-vars.el index fde78a9..34a99bf 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1695,7 +1695,7 @@ e.x. :type '(repeat (regexp :tag "Folder Regexp")) :group 'wl-pref) -(defcustom wl-message-buffer-prefetch-depth 5 +(defcustom wl-message-buffer-prefetch-depth 3 "*Depth of buffer prefetch in summary mode." :type 'integer :group 'wl-pref) diff --git a/wl/wl.el b/wl/wl.el index 4aa2123..cb0315e 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -761,7 +761,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (make-directory wl-temporary-file-directory) (error "Temp directory is not created")))))) -(defconst wl-check-type-variables +(defconst wl-check-variables-alist '((numberp . elmo-pop3-default-port) (symbolp . elmo-pop3-default-authenticate-type) (numberp . elmo-imap4-default-port) @@ -770,8 +770,8 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (numberp . wl-pop-before-smtp-port) (symbolp . wl-pop-before-smtp-authenticate-type))) -(defun wl-check-type () - (let ((type-variables wl-check-type-variables) +(defun wl-check-variables () + (let ((type-variables wl-check-variables-alist) type) (while (setq type (car type-variables)) (if (and (eval (cdr type)) @@ -783,6 +783,16 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (eval (cdr type)))) (setq type-variables (cdr type-variables))))) +(defun wl-check-variables-2 () + (if (< wl-message-buffer-cache-size 1) + (error "`wl-message-buffer-cache-size' must be larger than 0.")) + (when wl-message-buffer-prefetch-depth + (if (not (< wl-message-buffer-prefetch-depth + wl-message-buffer-cache-size)) + (error (concat + "`wl-message-buffer-prefetch-depth' must be smaller than " + "`wl-message-buffer-cache-size' - 1."))))) + ;;;###autoload (defun wl (&optional arg) "Start Wanderlust -- Yet Another Message Interface On Emacsen. @@ -805,7 +815,8 @@ If ARG (prefix argument) is specified, folder checkings are skipped." (wl-check-environment arg) (message "Checking environment...done") (message "Checking type of variables...") - (wl-check-type) + (wl-check-variables) + (wl-check-variables-2) (message "Checking type of variables...done"))) (wl-plugged-init (wl-folder arg)) (unless arg -- 1.7.10.4