* wl-dnd.el (wl-dnd-drop-func): Fix.
[elisp/wanderlust.git] / wl / wl.el
index 6039c2c..9b8189a 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -56,6 +56,7 @@
 (provide 'wl)                          ; circular dependency
 (require 'wl-folder)
 (require 'wl-summary)
+(require 'wl-action)
 (require 'wl-thread)
 (require 'wl-address)
 (require 'wl-news)
@@ -72,7 +73,8 @@
   (require 'smtp)
   (require 'wl-score)
   (require 'wl-fldmgr)
-  (require 'wl-mime))
+  (require 'wl-mime)
+  (require 'wl-spam))
 
 (defun wl-plugged-init (&optional make-alist)
   (setq elmo-plugged wl-plugged)
@@ -647,6 +649,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
   (wl-refile-alist-save)
   (wl-folder-info-save)
   (and (featurep 'wl-fldmgr) (wl-fldmgr-exit))
+  (and (featurep 'wl-spam) (wl-spam-save-status))
   (elmo-crosspost-message-alist-save)
   (message "Saving summary and folder status...done"))
 
@@ -695,10 +698,15 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
          (symbol-value 'wl-summary-subject-function))
     (fset 'wl-summary-subject-filter-func-internal
          (symbol-value 'wl-summary-subject-filter-function))
+    (wl-summary-define-mark-action)
+    (dolist (spec wl-summary-flag-alist)
+      (set-face-foreground
+       (make-face (intern
+                  (format "wl-highlight-summary-%s-flag-face" (car spec))))
+       (nth 1 spec)))
     (setq elmo-no-from wl-summary-no-from-message)
     (setq elmo-no-subject wl-summary-no-subject-message)
-    (and (wl-news-check)
-        (message "Wanderlust is updated, please read NEWS(.ja) for changes."))
+    (wl-news-check)
     (setq wl-init t)
     ;; This hook may contain the functions `wl-plugged-init-icons' and
     ;; `wl-biff-init-icons' for reasons of system internal to accord
@@ -706,7 +714,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 (error "Please set `wl-from' to your mail address."))
+  (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))
@@ -714,10 +722,10 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
       (unless (string-match "^<\\([^@]*\\)@\\([^@]*\\)>$" message-id)
        (cond
         ((string-match "@" wl-message-id-domain)
-         (error "Please remove `@' from `wl-message-id-domain'."))
+         (error "Please remove `@' from `wl-message-id-domain'"))
         (t
          (error
-          "Check around `wl-message-id-function' to get valid Message-ID string."))))
+          "Check around `wl-message-id-function' to get valid Message-ID string"))))
       (setq domain (match-string 2 message-id))
       (if (or (not (string-match "[^.]\\.[^.]" domain))
              (string= domain "localhost.localdomain"))
@@ -729,8 +737,6 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
          (queue-folder (wl-folder-get-elmo-folder wl-queue-folder))
          (lost+found-folder (wl-folder-get-elmo-folder
                              elmo-lost+found-folder)))
-      (if (not (elmo-folder-message-file-p draft-folder))
-         (error "%s is not allowed for draft folder" wl-draft-folder))
       (unless (elmo-folder-exists-p draft-folder)
        (if (y-or-n-p
             (format "Draft Folder %s does not exist, create it? "
@@ -779,23 +785,13 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
 
 (defun wl-check-variables-2 ()
   (if (< wl-message-buffer-cache-size 1)
-      (error "`wl-message-buffer-cache-size' must be larger than 0."))
+      (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."))))
-  (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))))))
+               "`wl-message-buffer-cache-size' - 1.")))))
 
 ;;;###autoload
 (defun wl (&optional arg)