* wl/wl-vars.el (wl-icon-dir): Fixed the docstring.
[elisp/wanderlust.git] / wl / wl.el
index b78eceb..b449773 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -1,4 +1,4 @@
-;;; wl.el -- Wanderlust bootstrap.
+;;; wl.el --- Wanderlust bootstrap.
 
 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
 ;; Copyright (C) 1998,1999,2000 Masahiro MURATA <muse@ba2.so-net.ne.jp>
@@ -36,7 +36,7 @@
 
 ;; from x-face.el
 (unless (and (fboundp 'defgroup)
-             (fboundp 'defcustom))
+            (fboundp 'defcustom))
   (require 'backquote)
   (defmacro defgroup (&rest args))
   (defmacro defcustom (symbol value &optional doc &rest args)
@@ -94,7 +94,7 @@
       (setq wl-plugged t))
      ((eq arg 'off)
       (setq wl-plugged nil))
-     (t (setq wl-plugged (null wl-plugged))))
+     (t (setq wl-plugged (not wl-plugged))))
     (elmo-set-plugged wl-plugged))
   (setq elmo-plugged wl-plugged
        wl-modeline-plug-status wl-plugged)
@@ -480,7 +480,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
     (save-excursion
       (beginning-of-line)
       (cond
-       ;; swtich variable
+       ;; switch variable
        ((bobp)
        (let (variable switch name)
          (goto-char cur-point)
@@ -499,7 +499,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
              (delete-region (match-beginning 2) (match-end 2))
              (insert (wl-plugged-string switch))
              (set-buffer-modified-p nil)))))
-       ;; swtich plug
+       ;; switch plug
        ((looking-at "^\\( *\\)\\[\\([^]]+\\)\\]\\([^ \n]*\\)")
        (let* ((indent (length (elmo-match-buffer 1)))
               (switch (elmo-match-buffer 2))
@@ -641,8 +641,9 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
 (defun wl-exit ()
   (interactive)
   (when (or (not wl-interactive-exit)
-           (y-or-n-p "Quit Wanderlust? "))
+           (y-or-n-p "Do you really want to quit Wanderlust? "))
     (elmo-quit)
+    (when wl-use-acap (funcall (symbol-function 'wl-acap-exit)))
     (wl-biff-stop)
     (run-hooks 'wl-exit-hook)
     (wl-save-status)
@@ -665,8 +666,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
 
 (defun wl-init ()
   (when (not wl-init)
-    (unless (featurep 'mime-setup)
-      (require 'mime-setup))
+    (require 'mime-setup)
     (setq elmo-plugged wl-plugged)
     (add-hook 'kill-emacs-hook 'wl-save-status)
     (wl-address-init)
@@ -763,7 +763,6 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
     (wl-init)
     (condition-case obj
        (progn
-         (wl-plugged-init (wl-folder arg))
          (if check
              (condition-case nil
                  (progn
@@ -772,12 +771,13 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
                    (message "Checking environment...done"))
                (error)
                (quit)))
+         (wl-plugged-init (wl-folder arg))
          (unless arg
            (run-hooks 'wl-auto-check-folder-pre-hook)
            (wl-folder-auto-check)
            (run-hooks 'wl-auto-check-folder-hook))
          (unless arg (wl-biff-start)))
-      (error 
+      (error
        (if (buffer-live-p demo-buf)
           (kill-buffer demo-buf))
        (signal (car obj)(cdr obj)))