* wl.el (wl-exit): Delete current frame if wl-folder-use-frame is
authorteranisi <teranisi>
Wed, 13 Jun 2001 04:17:16 +0000 (04:17 +0000)
committerteranisi <teranisi>
Wed, 13 Jun 2001 04:17:16 +0000 (04:17 +0000)
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
wl/wl-folder.el
wl/wl-summary.el
wl/wl-vars.el
wl/wl.el

index 19dba05..622cc92 100644 (file)
@@ -1,5 +1,19 @@
 2001-06-13  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * 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
index 7afc18d..6845733 100644 (file)
@@ -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)
index b9392a3..4ca35b8 100644 (file)
@@ -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))
index 0c6f17d..49e8850 100644 (file)
@@ -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)
 
index 696716b..1c6acd6 100644 (file)
--- 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))