* wl-expire.el (wl-summary-expire): Fixed problem that do not expire
authormurata <murata>
Sun, 22 Apr 2001 12:15:00 +0000 (12:15 +0000)
committermurata <murata>
Sun, 22 Apr 2001 12:15:00 +0000 (12:15 +0000)
  called in folder mode.
* wl-var.el (wl-summary-exit-pre-hook): New variable.
* wl-summary.el (wl-summary-exit-pre-hook): Run `wl-summary-exit-pre-hook'
  before exit summary mode.

wl/wl-expire.el
wl/wl-summary.el
wl/wl-vars.el

index 95e7f3e..f81203a 100644 (file)
@@ -537,7 +537,9 @@ Refile to archive folder followed message date."
               (or (not (interactive-p))
                   (y-or-n-p (format "Expire %s? " (elmo-folder-name-internal
                                                    folder)))))
-      (let* ((msgdb (wl-summary-buffer-msgdb))
+      (let* ((msgdb (or (wl-summary-buffer-msgdb)
+                       (progn (elmo-folder-open folder 'load-msgdb)
+                              (elmo-folder-msgdb folder))))
             (number-alist (elmo-msgdb-get-number-alist msgdb))
             (mark-alist (elmo-msgdb-get-mark-alist msgdb))
             expval rm-type val-type value more args
index e1db38f..92b5683 100644 (file)
@@ -1010,6 +1010,7 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
        summary-win
        message-buf message-win
        folder-buf folder-win)
+    (run-hooks 'wl-summary-exit-pre-hook)
     (if wl-summary-buffer-exit-function
        (funcall wl-summary-buffer-exit-function)
       (wl-summary-cleanup-temp-marks sticky)
@@ -2473,6 +2474,7 @@ If ARG, without confirm."
                     (elmo-folder-name-internal folder))) ; folder is moved.
               (eq major-mode 'wl-summary-mode)) ; called in summary.
       (setq wl-summary-last-visited-folder (wl-summary-buffer-folder-name))
+      (run-hooks 'wl-summary-exit-pre-hook)
       (wl-summary-cleanup-temp-marks (wl-summary-sticky-p))
       (wl-summary-save-view 'keep) ; keep current buffer, anyway.
       (elmo-folder-commit wl-summary-buffer-elmo-folder))
index 700bc86..43736ea 100644 (file)
@@ -457,6 +457,8 @@ reasons of system internal to accord facilities for the Emacs variants.")
   "A hook called when Message is displayed.")
 (defvar wl-message-exit-hook nil
   "A hook called when quit message.")
+(defvar wl-summary-exit-pre-hook nil
+  "A hook called before exit summary mode.")
 (defvar wl-summary-exit-hook nil
   "A hook called when exit summary mode.")
 (defvar wl-highlight-headers-hook nil