(wl-score-ov-entity-get): Call 'elmo-message-entity-field' with TYPE artgument.
[elisp/wanderlust.git] / wl / wl.el
index d05e4d0..aae6edb 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
 (defvar wl-plugged-port-label-alist
   (list (cons 119 "nntp")
        (cons 143 "imap4")
-       (cons 110 "pop3")))
+       (cons 110 "pop3")
+       (cons 25 "smtp")))
        ;;(cons elmo-pop-before-smtp-port "pop3")
 
 (defconst wl-plugged-switch-variables
@@ -672,6 +673,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
     (elmo-quit)
     (when wl-use-acap (funcall (symbol-function 'wl-acap-exit)))
     (wl-biff-stop)
+    (elmo-clear-signal-slots)
     (run-hooks 'wl-exit-hook)
     (wl-save-status)
     (wl-folder-cleanup-variables)
@@ -689,6 +691,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
 ;;     (delete-frame))
     (setq wl-init nil)
     (remove-hook 'kill-emacs-hook 'wl-save-status)
+    (elmo-passwd-alist-clear)
     t)
   (message "") ; empty minibuffer.
   )
@@ -710,14 +713,30 @@ 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-sort-command)
     (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-get-folder-function #'wl-folder-make-elmo-folder
+         elmo-progress-callback-function #'wl-progress-callback-function)
     (setq elmo-no-from wl-summary-no-from-message)
     (setq elmo-no-subject wl-summary-no-subject-message)
+    (elmo-global-flags-initialize (mapcar 'car wl-summary-flag-alist))
+    (elmo-connect-signal
+     nil
+     'message-number-changed
+     'wl-draft
+     (elmo-define-signal-handler (listener folder old-number new-number)
+       (dolist (buffer (wl-collect-draft))
+        (with-current-buffer buffer
+          (wl-draft-buffer-change-number old-number new-number)))
+       (wl-draft-rename-saved-config old-number new-number))
+     (elmo-define-signal-filter (listener folder old-number new-number)
+       (and folder
+           (string= (elmo-folder-name-internal folder) wl-draft-folder))))
     (wl-news-check)
     (setq wl-init t)
     ;; This hook may contain the functions `wl-plugged-init-icons' and
@@ -927,7 +946,8 @@ If ARG (prefix argument) is specified, folder checkings are skipped."
       wl-score-change-score-file wl-score-edit-current-scores
       wl-score-edit-file wl-score-flush-cache wl-summary-rescore
       wl-score-set-mark-below wl-score-set-expunge-below
-      wl-summary-increase-score wl-summary-lower-score ))))
+      wl-summary-increase-score wl-summary-lower-score )
+     ("wl-draft" wl-draft-rename-saved-config))))
 
 ;; for backward compatibility
 (defalias 'wl-summary-from-func-petname 'wl-summary-default-from)