From: teranisi Date: Wed, 13 Jun 2001 02:13:13 +0000 (+0000) Subject: * wl-vars.el (wl-folder-use-frame): New user option. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9845c3ee761110629933908e0f90b414ab9a1f62;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index ee9b6aa..af4b179 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,17 @@ +2001-06-13 Yuuichi Teranishi + + * 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 * wl-summary.el (wl-summary-sync-update): Bind diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 25a8bac..c46049b 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -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) diff --git a/wl/wl-message.el b/wl/wl-message.el index d578079..b8f9851 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -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. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 094b57c..74047ec 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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 diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 932b067..367dbb2 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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