From b4ba14c762c8d7f8f039c7ab1ffe54a28d74df23 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 7 Jan 2007 12:26:27 +0000 Subject: [PATCH] * 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. --- wl/ChangeLog | 9 +++++++++ wl/wl-mime.el | 19 ++++++++++++------- wl/wl-vars.el | 6 ++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index a1793b2..4437abb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2007-01-07 Hiroya Murata + + * 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 * wl-demo.el (wl-demo-copyright-notice): Add 2007. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index ecba24c..befea05 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -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 diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 3079425..329754e 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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 -- 1.7.10.4