* wl-vars.el (wl-folder-use-frame): New user option.
authorteranisi <teranisi>
Wed, 13 Jun 2001 02:13:13 +0000 (02:13 +0000)
committerteranisi <teranisi>
Wed, 13 Jun 2001 02:13:13 +0000 (02:13 +0000)
* wl-summary.el (wl-summary-exit): Back to folder frame if
wl-folder-use-frame is non-nil.
(wl-summary-redisplay-internal): Ignore cache if current folder
is draft folder,
(wl-summary-redisplay-no-mime): Ditto.
(wl-summary-redisplay-all-header): Ditto.

* wl-folder.el (wl-folder-select-buffer): Switch to other frame
if wl-folder-use-frame is non-nil.

wl/ChangeLog
wl/wl-folder.el
wl/wl-message.el
wl/wl-summary.el
wl/wl-vars.el

index ee9b6aa..af4b179 100644 (file)
@@ -1,3 +1,17 @@
+2001-06-13  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-vars.el (wl-folder-use-frame): New user option.
+
+       * wl-summary.el (wl-summary-exit): Back to folder frame if
+       wl-folder-use-frame is non-nil.
+       (wl-summary-redisplay-internal): Ignore cache if current folder
+       is draft folder,
+       (wl-summary-redisplay-no-mime): Ditto.
+       (wl-summary-redisplay-all-header): Ditto.
+
+       * wl-folder.el (wl-folder-select-buffer): Switch to other frame
+       if wl-folder-use-frame is non-nil.
+
 2001-06-06  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-sync-update): Bind
index 25a8bac..c46049b 100644 (file)
@@ -1301,19 +1301,21 @@ If current line is group folder, all subfolders are marked."
 
 (defun wl-folder-select-buffer (buffer)
   (let ((gbw (get-buffer-window buffer))
-       ret-val)
+       exists)
     (if gbw
        (progn (select-window gbw)
-              (setq ret-val t))
-      (condition-case ()
-         (unwind-protect
-             (split-window-horizontally wl-folder-window-width)
-           (other-window 1))
-       (error nil)))
+              (setq exists t))
+      (unless wl-folder-use-frame
+       (condition-case ()
+           (unwind-protect
+               (split-window-horizontally wl-folder-window-width)
+             (other-window 1))
+         (error nil))))
     (set-buffer buffer)
-    (switch-to-buffer buffer)
-    ret-val
-    ))
+    (if wl-folder-use-frame
+       (switch-to-buffer-other-frame buffer)
+      (switch-to-buffer buffer))
+    exists))
 
 (defun wl-folder-toggle-disp-summary (&optional arg folder)
   (interactive)
index d578079..b8f9851 100644 (file)
@@ -52,8 +52,7 @@
 
 (defvar wl-message-buffer-prefetch-folder-type-list t)
 
-(defvar wl-message-buffer-prefetch-debug
-  t)
+(defvar wl-message-buffer-prefetch-debug t)
 
 (defvar wl-message-buffer nil) ; message buffer.
 
index 094b57c..74047ec 100644 (file)
@@ -1036,12 +1036,25 @@ 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
+                (> (length (visible-frame-list)) 1))
+           (delete-frame))
        (if (setq folder-buf (get-buffer wl-folder-buffer-name))
-           (if (setq folder-win (get-buffer-window folder-buf))
-               ;; folder win is already displayed.
-               (select-window folder-win)
-             ;; folder win is not displayed.
-             (switch-to-buffer folder-buf))
+           (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)))
+             (if (setq folder-win (get-buffer-window folder-buf))
+                 ;; folder win is already displayed.
+                 (select-window folder-win)
+               ;; folder win is not displayed.
+               (switch-to-buffer folder-buf)))
          ;; currently no folder buffer
          (wl-folder))
        (and wl-folder-move-cur-folder
@@ -5156,7 +5169,11 @@ Use function list is `wl-summary-write-current-folder-functions'."
          (wl-summary-mark-as-read
           nil
           ;; not fetched, then change server-mark.
-          (if (wl-message-redisplay folder num 'mime force-reload)
+          (if (wl-message-redisplay folder num 'mime
+                                    (or force-reload
+                                        (string= (elmo-folder-name-internal
+                                                  folder)
+                                                 wl-draft-folder)))
               nil
             ;; plugged, then leave server-mark.
             (if (and
@@ -5192,7 +5209,9 @@ Use function list is `wl-summary-write-current-folder-functions'."
          (setq wl-summary-buffer-last-displayed-msg
                wl-summary-buffer-current-msg)
          (setq wl-current-summary-buffer (current-buffer))
-         (wl-message-redisplay fld num 'as-is)
+         (wl-message-redisplay fld num 'as-is
+                               (string= (elmo-folder-name-internal fld)
+                                        wl-draft-folder))
          (wl-summary-mark-as-read nil nil t)
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
@@ -5217,7 +5236,9 @@ Use function list is `wl-summary-write-current-folder-functions'."
          (setq wl-summary-buffer-last-displayed-msg
                wl-summary-buffer-current-msg)
          (setq wl-current-summary-buffer (current-buffer))
-         (if (wl-message-redisplay fld num 'all-header); t if displayed.
+         (if (wl-message-redisplay fld num 'all-header
+                                   (string= (elmo-folder-name-internal fld)
+                                            wl-draft-folder))
              (wl-summary-mark-as-read nil nil t))
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
index 932b067..367dbb2 100644 (file)
@@ -1157,6 +1157,11 @@ Each elements are regexp of field-name."
   :group 'wl-summary
   :group 'wl-pref)
 
+(defcustom wl-folder-use-frame nil
+  "*Use dedicated frame for each folder if non-nil."
+  :type 'boolean
+  :group 'wl-pref)
+
 (defcustom wl-stay-folder-window nil
   "*Stay folder window when folder is selected if non-nil."
   :type 'boolean