(wl-summary-goto-folder-subr): Call
authorhmurata <hmurata>
Fri, 6 Apr 2007 08:00:02 +0000 (08:00 +0000)
committerhmurata <hmurata>
Fri, 6 Apr 2007 08:00:02 +0000 (08:00 +0000)
`elmo-folder-close' instead of `elmo-folder-commit' if discard
current summary.

wl/ChangeLog
wl/wl-summary.el

index 8b64f56..6f88e0d 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-06  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-util.el (wl-read-shell-commande): New function or alias.
index 0f4e6ec..3b0b9df 100644 (file)
@@ -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)