From 926c4357239813af5c5496abbd45522dcb3dbb5e Mon Sep 17 00:00:00 2001 From: okada Date: Thu, 17 Jan 2002 06:33:08 +0000 Subject: [PATCH] * wl.el (wl-check-type): New function. (wl-check-type-variables): New variable. --- wl/ChangeLog | 5 +++++ wl/wl.el | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/wl/ChangeLog b/wl/ChangeLog index dcf0a17..3ced531 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,10 @@ 2002-01-17 Kenichi OKADA + * wl.el (wl-check-type): New function. + (wl-check-type-variables): New variable. + +2002-01-17 Kenichi OKADA + * wl-vars.el (wl-pop-before-smtp-authenticate-type): Fix. 2002-01-17 Kenichi OKADA diff --git a/wl/wl.el b/wl/wl.el index 98035ca..a95c20d 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -758,6 +758,27 @@ 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 + '((numberp . elmo-pop3-default-port) + (symbolp . elmo-pop3-default-authenticate-type) + (numberp . elmo-imap4-default-port) + (symbolp . elmo-imap4-default-authenticate-type) + (numberp . elmo-nntp-default-port) + (numberp . wl-pop-before-smtp-port) + (symbolp . wl-pop-before-smtp-authenticate-type))) + +(defun wl-check-type () + (let ((type-variables wl-check-type-variables)) + (while (setq type (car type-variables)) + (if (and (eval (cdr type)) + (not (funcall (car type) + (eval (cdr type))))) + (error "%s must be %s: %S" + (cdr type) + (substring (format "%s" (car type)) 0 -1) + (eval (cdr type)))) + (setq type-variables (cdr type-variables))))) + ;;;###autoload (defun wl (&optional arg) "Start Wanderlust -- Yet Another Message Interface On Emacsen. -- 1.7.10.4