* wl-message.el (wl-message-exit): Switch to mime-mother-buffer if
authoryoichi <yoichi>
Sat, 10 Jul 2004 16:04:47 +0000 (16:04 +0000)
committeryoichi <yoichi>
Sat, 10 Jul 2004 16:04:47 +0000 (16:04 +0000)
the buffer is generated from another message buffer.

wl/ChangeLog
wl/wl-message.el

index 93174ff..11ebb00 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-11  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-message.el (wl-message-exit): Switch to mime-mother-buffer if
+       the buffer is generated from another message buffer.
+
 2004-07-06  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-fldmgr.el (wl-fldmgr-save-access-list): New function
index a97fdc2..ba764cf 100644 (file)
@@ -338,15 +338,18 @@ Returns non-nil if bottom of message."
   (setq mode-name "Message"))
 
 (defun wl-message-exit ()
-  "Move to summary buffer."
+  "Move to summary buffer or mother buffer."
   (interactive)
-  (let (summary-buf summary-win)
-    (if (setq summary-buf wl-message-buffer-cur-summary-buffer)
-       (if (setq summary-win (get-buffer-window summary-buf))
-           (select-window summary-win)
-         (switch-to-buffer summary-buf)
-         (wl-message-select-buffer wl-message-buffer)
-         (select-window (get-buffer-window summary-buf))))
+  (let (summary-buf summary-win mother-buffer)
+    (cond ((setq summary-buf wl-message-buffer-cur-summary-buffer)
+          (if (setq summary-win (get-buffer-window summary-buf))
+              (select-window summary-win)
+            (switch-to-buffer summary-buf)
+            (wl-message-select-buffer wl-message-buffer)
+            (select-window (get-buffer-window summary-buf))))
+         ((setq mother-buffer mime-mother-buffer)
+          (kill-buffer (current-buffer))
+          (switch-to-buffer mother-buffer)))
     (run-hooks 'wl-message-exit-hook)))
 
 (defun wl-message-toggle-disp-summary ()