From b47139d368b5bb870b3039da4891f686bb2bb49a Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 13 Jun 2001 04:17:57 +0000 Subject: [PATCH] * wl.el (wl-exit): Delete current frame if wl-folder-use-frame is non-nil. (wl): Don't show demo if wl-demo is 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 | 15 +++++++++++++++ wl/wl-folder.el | 25 +++++++++++++++++++------ wl/wl-summary.el | 4 ++-- wl/wl-vars.el | 7 ++++++- wl/wl.el | 5 ++++- 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index af4b179..070d728 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,20 @@ 2001-06-13 Yuuichi Teranishi + * wl.el (wl-exit): Delete current frame if wl-folder-use-frame is + non-nil. + (wl): Don't show demo if wl-demo is 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 c46049b..1db38fd 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -1305,14 +1305,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)) @@ -1450,10 +1450,23 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (defun wl-folder (&optional arg) (interactive "P") - (let (initialize) - (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))) (set-buffer wl-folder-buffer-name) (wl-folder-mode) (sit-for 0) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 74047ec..a6cb532 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1036,11 +1036,11 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." ;; delete message window if displayed. (if (and wl-message-buffer (get-buffer-window wl-message-buffer)) (delete-window (get-buffer-window wl-message-buffer))) - (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 367dbb2..1c14231 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1158,7 +1158,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 3c2cf2b..349c5bc 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -659,6 +659,9 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (list wl-folder-buffer-name wl-plugged-buf-name) "\\|"))) + (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)) @@ -767,7 +770,7 @@ If ARG (prefix argument) is specified, folder checkings are skipped." (elmo-init) (let (demo-buf) (unless wl-init - (setq demo-buf (wl-demo))) + (if wl-demo (setq demo-buf (wl-demo)))) (wl-init) (unless wl-init (condition-case nil -- 1.7.10.4