* wl-draft.el (wl-draft-reply-saved-variables): New constant.
authorhmurata <hmurata>
Thu, 24 Oct 2002 16:43:52 +0000 (16:43 +0000)
committerhmurata <hmurata>
Thu, 24 Oct 2002 16:43:52 +0000 (16:43 +0000)
(wl-draft-reply): Append `wl-draft-reply-saved-variables' to
`wl-draft-config-variables'.
(wl-draft-kill): Fixed problem when the draft is reedit.

wl/ChangeLog
wl/wl-draft.el

index 84d61f2..0b0cc3e 100644 (file)
@@ -1,3 +1,10 @@
+2002-10-24  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-draft.el (wl-draft-reply-saved-variables): New constant.
+       (wl-draft-reply): Append `wl-draft-reply-saved-variables' to
+       `wl-draft-config-variables'.
+       (wl-draft-kill): Fixed problem when the draft is reedit.
+
 2002-10-24  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-draft.el (wl-draft-highlight-and-recenter): Restore
index c427022..9f57c69 100644 (file)
@@ -89,6 +89,10 @@ e.g.
 
 (defvar wl-draft-parent-number nil)
 
+(defconst wl-draft-reply-saved-variables
+  '(wl-draft-parent-folder
+    wl-draft-parent-number))
+
 (defvar wl-draft-config-sub-func-alist
   '((body              . wl-draft-config-sub-body)
     (top               . wl-draft-config-sub-top)
@@ -479,7 +483,10 @@ Reply to author if WITH-ARG is non-nil."
                    (cons 'Mail-Followup-To mail-followup-to))
              nil nil nil nil parent-folder)
     (setq wl-draft-parent-number number)
-    (setq wl-draft-reply-buffer buf))
+    (setq wl-draft-reply-buffer buf)
+    (setq wl-draft-config-variables
+         (append wl-draft-reply-saved-variables
+                 wl-draft-config-variables)))
   (run-hooks 'wl-reply-hook))
 
 (defun wl-draft-add-references ()
@@ -771,13 +778,23 @@ Reply to author if WITH-ARG is non-nil."
               (or force-kill
                   (y-or-n-p "Kill Current Draft? ")))
       (let ((cur-buf (current-buffer)))
-       (when wl-draft-parent-number
-         (let ((number wl-draft-parent-number))
-           (with-current-buffer wl-draft-buffer-cur-summary-buffer
-             (wl-summary-jump-to-msg number)
-             (elmo-folder-unmark-answered wl-summary-buffer-elmo-folder
-                                          (list number))
-             (wl-summary-update-mark number))))
+       (when (and wl-draft-parent-number
+                  (not (string= wl-draft-parent-folder "")))
+         (let* ((number wl-draft-parent-number)
+                (folder-name wl-draft-parent-folder)
+                (folder (wl-folder-get-elmo-folder folder-name))
+                buffer)
+           (if (and (setq buffer (wl-summary-get-buffer folder-name))
+                    (with-current-buffer buffer
+                      (string= (wl-summary-buffer-folder-name)
+                               folder-name)))
+               (with-current-buffer buffer
+                 (elmo-folder-unmark-answered folder (list number))
+                 (wl-summary-jump-to-msg number)
+                 (wl-summary-update-mark number))
+             (elmo-folder-open folder 'load-msgdb)
+             (elmo-folder-unmark-answered folder (list number))
+             (elmo-folder-close folder))))
        (wl-draft-hide cur-buf)
        (wl-draft-delete cur-buf)))
     (message "")))