From c73d678c771bbd49ab6e5f5780d7409055db4aaf Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 13 Jun 2001 04:17:16 +0000 Subject: [PATCH] * wl.el (wl-exit): Delete current frame if wl-folder-use-frame is non-nil. * wl-summary.el (wl-summary-exit): Renamed wl-folder-use-frame to wl-summary-use-frame. * wl-vars.el (wl-summary-use-frame): New user option. (wl-folder-use-frame): Changed docstring. * wl-folder.el (wl-folder): Make new frame if wl-folder-use-frame is non-nil. (wl-folder-select-buffer): Renamed wl-folder-use-frame to wl-summary-use-frame. --- wl/ChangeLog | 14 ++++++++++++++ wl/wl-folder.el | 27 ++++++++++++++++++++------- wl/wl-summary.el | 4 ++-- wl/wl-vars.el | 7 ++++++- wl/wl.el | 3 +++ 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 19dba05..622cc92 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,19 @@ 2001-06-13 Yuuichi Teranishi + * wl.el (wl-exit): Delete current frame if wl-folder-use-frame is + non-nil. + + * wl-summary.el (wl-summary-exit): Renamed wl-folder-use-frame to + wl-summary-use-frame. + + * wl-vars.el (wl-summary-use-frame): New user option. + (wl-folder-use-frame): Changed docstring. + + * wl-folder.el (wl-folder): Make new frame if wl-folder-use-frame is + non-nil. + (wl-folder-select-buffer): Renamed wl-folder-use-frame to + wl-summary-use-frame. + * wl-vars.el (wl-folder-use-frame): New user option. * wl-summary.el (wl-summary-exit): Back to folder frame if diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 7afc18d..6845733 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -1290,14 +1290,14 @@ If current line is group folder, all subfolders are marked." (if gbw (progn (select-window gbw) (setq exists t)) - (unless wl-folder-use-frame + (unless wl-summary-use-frame (condition-case () (unwind-protect (split-window-horizontally wl-folder-window-width) (other-window 1)) (error nil)))) (set-buffer buffer) - (if wl-folder-use-frame + (if wl-summary-use-frame (switch-to-buffer-other-frame buffer) (switch-to-buffer buffer)) exists)) @@ -1434,11 +1434,24 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (defun wl-folder (&optional arg) (interactive "P") - (let (initialize) -;;; (delete-other-windows) - (if (get-buffer wl-folder-buffer-name) - (switch-to-buffer wl-folder-buffer-name) - (switch-to-buffer (get-buffer-create wl-folder-buffer-name)) + (let (initialize folder-buf) + (if (setq folder-buf (get-buffer wl-folder-buffer-name)) + (if wl-folder-use-frame + (let (select-frame) + (save-selected-window + (dolist (frame (visible-frame-list)) + (select-frame frame) + (if (get-buffer-window folder-buf) + (setq select-frame frame)))) + (if select-frame + (select-frame select-frame) + (switch-to-buffer folder-buf))) + (switch-to-buffer folder-buf)) + (if wl-folder-use-frame + (switch-to-buffer-other-frame + (get-buffer-create wl-folder-buffer-name)) + (switch-to-buffer (get-buffer-create wl-folder-buffer-name))) + (switch-to-buffer (get-buffer wl-folder-buffer-name)) (wl-folder-mode) (wl-folder-init) (set-buffer wl-folder-buffer-name) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index b9392a3..4ca35b8 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1077,11 +1077,11 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (if (setq message-buf (get-buffer wl-message-buf-name)) (if (setq message-win (get-buffer-window message-buf)) (delete-window message-win))) - (if (and wl-folder-use-frame + (if (and wl-summary-use-frame (> (length (visible-frame-list)) 1)) (delete-frame)) (if (setq folder-buf (get-buffer wl-folder-buffer-name)) - (if wl-folder-use-frame + (if wl-summary-use-frame (let (select-frame) (save-selected-window (dolist (frame (visible-frame-list)) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 0c6f17d..49e8850 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1153,7 +1153,12 @@ Each elements are regexp of field-name." :group 'wl-pref) (defcustom wl-folder-use-frame nil - "*Use dedicated frame for each folder if non-nil." + "*Use dedicated frame for folder mode if non-nil." + :type 'boolean + :group 'wl-pref) + +(defcustom wl-summary-use-frame nil + "*Use dedicated frame for each folder summary if non-nil." :type 'boolean :group 'wl-pref) diff --git a/wl/wl.el b/wl/wl.el index 696716b..1c6acd6 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -647,6 +647,9 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (elmo-buffer-cache-clean-up) (if (fboundp 'mmelmo-cleanup-entity-buffers) (mmelmo-cleanup-entity-buffers)) + (if (and wl-folder-use-frame + (> (length (visible-frame-list)) 1)) + (delete-frame)) (setq wl-init nil) (unless wl-on-nemacs (remove-hook 'kill-emacs-hook 'wl-save-status)) -- 1.7.10.4