From ea969af868fd37c69e9151d73076a781825eff28 Mon Sep 17 00:00:00 2001 From: yoichi Date: Sun, 17 Mar 2002 13:51:51 +0000 Subject: [PATCH] * wl.el (wl-check-environment): Use elmo-warning instead of error for non-critical ones. Remove trash folder check. (wl): Don't ignore error in wl-check-environment. * wl-summary.el (wl-summary-get-delete-folder): Add trash folder check, which is moved from `wl-check-environment'. (Adviced by Teranishi-san [X-Mail-Count: 9661]) --- wl/ChangeLog | 11 +++++++++++ wl/wl-summary.el | 9 ++++++++- wl/wl.el | 31 ++++++++++++------------------- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 450f666..a1de8f5 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,16 @@ 2002-03-17 Yoichi NAKAYAMA + * wl.el (wl-check-environment): Use elmo-warning instead of + error for non-critical ones. + Remove trash folder check. + (wl): Don't ignore error in wl-check-environment. + + * wl-summary.el (wl-summary-get-delete-folder): Add trash folder + check, which is moved from `wl-check-environment'. + (Adviced by Teranishi-san [X-Mail-Count: 9661]) + +2002-03-17 Yoichi NAKAYAMA + * wl-summary.el (wl-summary-write-current-folder): If it cannot guess anything, call wl-summary-write. (wl-summary-write): Create draft with blank To field. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 19c8d6f..ea0cebe 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1925,7 +1925,14 @@ If ARG is non-nil, checking is omitted." ((or (equal type 'remove) (equal type 'null)) 'null) (t;; (equal type 'trash) - wl-trash-folder))))) + (let ((trash-folder (wl-folder-get-elmo-folder wl-trash-folder))) + (unless (elmo-folder-exists-p trash-folder) + (if (y-or-n-p + (format "Trash Folder %s does not exist, create it? " + wl-trash-folder)) + (elmo-folder-create trash-folder) + (error "Trash Folder is not created")))) + wl-trash-folder))))) (defun wl-summary-delete-important-msgs-from-list (delete-list mark-alist) diff --git a/wl/wl.el b/wl/wl.el index ae39fb3..5575d7f 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -703,32 +703,33 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (run-hooks 'wl-init-hook))) (defun wl-check-environment (no-check-folder) - (unless wl-from (error "Please set `wl-from'")) + (unless wl-from (elmo-warning "Please set `wl-from'.")) ;; Message-ID (let (from domain) (if wl-message-id-use-wl-from (if (and (setq from (wl-address-header-extract-address wl-from)) (string-match "^\\(.*\\)@\\(.*\\)$" from)) (setq domain (match-string 2 from)) - (error "Please set `wl-from' to get valid Message-ID string.")) + (elmo-warning + "Please set `wl-from' to get valid Message-ID string.")) (setq domain (or wl-message-id-domain (if wl-local-domain (concat (system-name) "." wl-local-domain) (system-name))))) (unless (string-match "[^.]\\.[^.]" domain) - (error "Please set `wl-local-domain' to get valid FQDN")) + (elmo-warning "Please set `wl-local-domain' to get valid FQDN.")) (if (string-match "@" domain) - (error "Please remove `@' from `wl-message-id-domain'")) + (error "Please remove `@' from `wl-message-id-domain'.")) (if (string= wl-local-domain "localdomain") - (error "Please set `wl-local-domain'")) + (elmo-warning "Please set `wl-local-domain' properly.")) (if (string= domain "localhost.localdomain") - (error "Please set `wl-message-id-domain'"))) + (elmo-warning + "Please set `wl-message-id-domain' to get valid Message-ID string."))) ;; folders (when (not no-check-folder) (let ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder)) (queue-folder (wl-folder-get-elmo-folder wl-queue-folder)) - (trash-folder (wl-folder-get-elmo-folder wl-trash-folder)) (lost+found-folder (wl-folder-get-elmo-folder elmo-lost+found-folder))) (if (not (elmo-folder-message-file-p draft-folder)) @@ -747,12 +748,6 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (elmo-folder-create queue-folder) (error "Queue Folder is not created"))) (when (not (eq no-check-folder 'wl-draft)) - (unless (elmo-folder-exists-p trash-folder) - (if (y-or-n-p - (format "Trash Folder %s does not exist, create it? " - wl-trash-folder)) - (elmo-folder-create trash-folder) - (error "Trash Folder is not created"))) (unless (elmo-folder-exists-p lost+found-folder) (elmo-folder-create lost+found-folder))) ;; tmp dir @@ -812,12 +807,10 @@ If ARG (prefix argument) is specified, folder checkings are skipped." (condition-case obj (progn (if check - (condition-case nil - (progn - (message "Checking environment...") - (wl-check-environment arg) - (message "Checking environment...done")) - ((error quit)))) + (progn + (message "Checking environment...") + (wl-check-environment arg) + (message "Checking environment...done"))) (message "Checking type of variables...") (wl-check-variables) (wl-check-variables-2) -- 1.7.10.4