From 4aef17f8d9db560b2e7e26c4e13649ca637e8c09 Mon Sep 17 00:00:00 2001 From: hmurata Date: Fri, 6 Apr 2007 08:00:02 +0000 Subject: [PATCH] (wl-summary-goto-folder-subr): Call `elmo-folder-close' instead of `elmo-folder-commit' if discard current summary. --- wl/ChangeLog | 6 ++++++ wl/wl-summary.el | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 8b64f56..6f88e0d 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2007-04-06 Hiroya Murata + + * wl-summary.el (wl-summary-goto-folder-subr): Call + `elmo-folder-close' instead of `elmo-folder-commit' if discard + current summary. + 2007-03-08 Hiroya Murata * wl-util.el (wl-read-shell-commande): New function or alias. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 0f4e6ec..3b0b9df 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2378,10 +2378,13 @@ If ARG, without confirm." (eq major-mode 'wl-summary-mode)) ; called in summary. (setq wl-summary-last-visited-folder (wl-summary-buffer-folder-name)) (run-hooks 'wl-summary-exit-pre-hook) - (if (or force-exit (not (wl-summary-sticky-p))) + (let ((discard-contents (or force-exit (not (wl-summary-sticky-p))))) + (when discard-contents (wl-summary-cleanup-temp-marks)) - (wl-summary-save-view) - (elmo-folder-commit wl-summary-buffer-elmo-folder) + (wl-summary-save-view) + (if discard-contents + (elmo-folder-close wl-summary-buffer-elmo-folder) + (elmo-folder-commit wl-summary-buffer-elmo-folder))) (if (and (wl-summary-sticky-p) force-exit) (kill-buffer (current-buffer)))) (setq buf (wl-summary-get-buffer-create (elmo-folder-name-internal folder) -- 1.7.10.4