* wl-vars.el (wl-message-popup-buffers): New user option.
authorhmurata <hmurata>
Sun, 7 Jan 2007 12:26:27 +0000 (12:26 +0000)
committerhmurata <hmurata>
Sun, 7 Jan 2007 12:26:27 +0000 (12:26 +0000)
* wl-mime.el (wl-message-delete-mime-out-buf): Abolish.
(wl-message-delete-popup-windows): New function that substitues
above one.
(wl-mime-setup): Follow the above change.

wl/ChangeLog
wl/wl-mime.el
wl/wl-vars.el

index a1793b2..4437abb 100644 (file)
@@ -1,3 +1,12 @@
+2007-01-07  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-vars.el (wl-message-popup-buffers): New user option.
+
+       * wl-mime.el (wl-message-delete-mime-out-buf): Abolish.
+       (wl-message-delete-popup-windows): New function that substitues
+       above one.
+       (wl-mime-setup): Follow the above change.
+
 2007-01-01  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-demo.el (wl-demo-copyright-notice): Add 2007.
index ecba24c..befea05 100644 (file)
@@ -385,11 +385,15 @@ It calls following-method selected from variable
        mime-view-ignored-field-list)
     (mime-view-mode nil nil nil inbuf outbuf)))
 
-(defun wl-message-delete-mime-out-buf ()
-  (let (mime-out-buf mime-out-win)
-    (if (setq mime-out-buf (get-buffer mime-echo-buffer-name))
-       (if (setq mime-out-win (get-buffer-window mime-out-buf))
-           (delete-window mime-out-win)))))
+(defun wl-message-delete-popup-windows ()
+  (dolist (buffer wl-message-popup-buffers)
+    (when (or (stringp buffer)
+             (and (symbolp buffer)
+                  (boundp buffer)
+                  (setq buffer (symbol-value buffer))))
+      (let ((window (get-buffer-window buffer)))
+       (when window
+         (delete-window window))))))
 
 (defun wl-message-request-partial (folder number)
   (elmo-set-work-buf
@@ -845,8 +849,9 @@ With ARG, ask destination folder."
             'wl-original-message-mode 'wl-message-exit)
   (set-alist 'mime-preview-over-to-next-method-alist
             'wl-original-message-mode 'wl-message-exit)
-  (add-hook 'wl-summary-redisplay-hook 'wl-message-delete-mime-out-buf)
-  (add-hook 'wl-message-exit-hook 'wl-message-delete-mime-out-buf)
+  (add-hook 'wl-summary-toggle-disp-off-hook 'wl-message-delete-popup-windows)
+  (add-hook 'wl-summary-redisplay-hook 'wl-message-delete-popup-windows)
+  (add-hook 'wl-message-exit-hook 'wl-message-delete-popup-windows)
 
   (ctree-set-calist-strictly
    'mime-preview-condition
index 3079425..329754e 100644 (file)
@@ -2278,6 +2278,12 @@ See also variable `wl-summary-next-no-unread-command'."
   :group 'wl-pref
   :group 'wl-setting)
 
+(defcustom wl-message-popup-buffers '(mime-echo-buffer-name epa-info-buffer)
+  "*List of buffer or name which is popped up with message buffer."
+  :type '(repeat (choice (symbol :tag "Variable")
+                        (string :tag "Buffer name")))
+  :group 'wl-setting)
+
 (defcustom wl-message-buffer-name " *WL:Message*"
   "*Buffer name for message buffers."
   :group 'wl-pref