Synch up with main trunk.
[elisp/wanderlust.git] / wl / wl.el
index 933ae53..d2194c4 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -703,7 +703,7 @@ 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 (elmo-warning "Please set `wl-from'."))
+  (unless wl-from (error "Please set `wl-from' to your mail address."))
   ;; Message-ID
   (when wl-insert-message-id
     (let ((message-id (funcall wl-message-id-function))
@@ -782,7 +782,17 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
                wl-message-buffer-cache-size))
        (error (concat
                "`wl-message-buffer-prefetch-depth' must be smaller than "
-               "`wl-message-buffer-cache-size' - 1.")))))
+               "`wl-message-buffer-cache-size' - 1."))))
+  (let (case-fold-search)
+    (unless (string-match "%T" wl-summary-line-format)
+      (error "`wl-summary-line-format' must contain %%T and %%P"))
+    (unless (string-match "%P" wl-summary-line-format)
+      (error "`wl-summary-line-format' must contain %%T and %%P"))
+    (dolist (pair wl-folder-summary-line-format-alist)
+      (unless (string-match "%T" (cdr pair))
+       (error "Format `%s' must contain %%T and %%P" (cdr pair)))
+      (unless (string-match "%P" (cdr pair))
+       (error "Format `%s' must contain %%T and %%P" (cdr pair))))))
 
 ;;;###autoload
 (defun wl (&optional arg)
@@ -804,12 +814,13 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
              (progn
                (message "Checking environment...")
                (wl-check-environment arg)
-               (message "Checking environment...done")))
-         (message "Checking type of variables...")
-         (wl-check-variables)
-         (wl-check-variables-2)
-         (message "Checking type of variables...done")
-         (wl-plugged-init (wl-folder arg))
+               (message "Checking environment...done")
+               (message "Checking type of variables...")
+               (wl-check-variables)
+               (wl-check-variables-2)
+               (message "Checking type of variables...done")))
+         (let ((inhibit-quit t))
+           (wl-plugged-init (wl-folder arg)))
          (unless arg
            (run-hooks 'wl-auto-check-folder-pre-hook)
            (wl-folder-auto-check)
@@ -818,7 +829,6 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
       (error
        (if (buffer-live-p demo-buf)
           (kill-buffer demo-buf))
-       (setq wl-init nil)
        (signal (car obj)(cdr obj)))
       (quit))
     (if (buffer-live-p demo-buf)