Abolish summary-buf argument of wl-draft and
authoryoichi <yoichi>
Thu, 7 Mar 2002 09:53:53 +0000 (09:53 +0000)
committeryoichi <yoichi>
Thu, 7 Mar 2002 09:53:53 +0000 (09:53 +0000)
use parent-folder argument instead of it.

wl/ChangeLog
wl/wl-draft.el
wl/wl-summary.el

index 7ab55f5..924a2dc 100644 (file)
@@ -1,3 +1,13 @@
+2002-03-07  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-draft.el (wl-draft): Abolish summary-buf argument and use
+       parent-folder argument instead of it.
+       (wl-draft-create-buffer): Ditto.
+       (wl-draft-forward): Ditto.
+       (wl-draft-reply): Ditto.
+       * wl-summary.el (wl-summary-write): Ditto.
+       (wl-summary-write-current-folder): Ditto.
+
 2002-03-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * wl-draft.el (wl-draft-insert-x-face-field-here): Strip X-Face
index 3335091..4fa6b6d 100644 (file)
          (t cc))))
 
 (defun wl-draft-forward (original-subject summary-buf)
-  (let (references)
+  (let (references parent-folder)
+    (with-current-buffer summary-buf
+      (setq parent-folder (wl-summary-buffer-folder-name)))
     (with-current-buffer (wl-message-get-original-buffer)
       (setq references (nconc
                        (std11-field-bodies '("References" "In-Reply-To"))
            references (when references
                         (mapconcat 'identity references "\n\t"))))
     (wl-draft "" (concat "Forward: " original-subject)
-             nil nil references nil nil nil nil nil nil summary-buf))
+             nil nil references nil nil nil nil nil nil nil parent-folder))
   (goto-char (point-max))
   (wl-draft-insert-message)
   (mail-position-on-field "To"))
@@ -422,7 +424,7 @@ Reply to author if WITH-ARG is non-nil."
                         (mapconcat 'identity references "\n\t")))
     (wl-draft
      to subject in-reply-to cc references newsgroups mail-followup-to
-     nil nil nil nil summary-buf nil parent-folder)
+     nil nil nil nil nil parent-folder)
     (setq wl-draft-reply-buffer buf))
   (run-hooks 'wl-reply-hook))
 
@@ -572,7 +574,7 @@ Reply to author if WITH-ARG is non-nil."
                   mail-followup-to
                   content-type content-transfer-encoding
                   (buffer-substring (point) (point-max))
-                  'edit-again nil
+                  'edit-again
                   (if (member (nth 1 (std11-extract-address-components from))
                               wl-user-mail-address-list)
                       from)))
@@ -1426,7 +1428,7 @@ Derived from `message-save-drafts' in T-gnus."
 (defun wl-draft (&optional to subject in-reply-to cc references newsgroups
                           mail-followup-to
                           content-type content-transfer-encoding
-                          body edit-again summary-buf from parent-folder)
+                          body edit-again from parent-folder)
   "Write and send mail/news message with Wanderlust."
   (interactive)
   (require 'wl)
@@ -1445,7 +1447,7 @@ Derived from `message-save-drafts' in T-gnus."
            (eq this-command 'wl-draft)
            (eq this-command 'wl-summary-write)
            (eq this-command 'wl-summary-write-current-folder))
-          parent-folder summary-buf))
+          parent-folder))
     (setq header-alist
          (list
           (cons "From: " (or from wl-from))
@@ -1481,10 +1483,10 @@ Derived from `message-save-drafts' in T-gnus."
           (goto-char (point-max))))
     buf-name))
 
-(defun wl-draft-create-buffer (&optional full parent-folder summary-buf)
+(defun wl-draft-create-buffer (&optional full parent-folder)
   (let* ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder))
         (parent-folder (or parent-folder (wl-summary-buffer-folder-name)))
-        (summary-buf (or summary-buf (wl-summary-get-buffer parent-folder)))
+        (summary-buf (wl-summary-get-buffer parent-folder))
        buf-name file-name num change-major-mode-hook)
     (if (not (elmo-folder-message-file-p draft-folder))
        (error "%s folder cannot be used for draft folder" wl-draft-folder))
index c31703f..41d0ffc 100644 (file)
@@ -4980,7 +4980,7 @@ Reply to author if invoked with ARG."
   "Write a new draft from Summary."
   (interactive)
   (wl-draft nil nil nil nil nil
-           nil nil nil nil nil nil (current-buffer)
+           nil nil nil nil nil nil
            nil (wl-summary-buffer-folder-name))
   (run-hooks 'wl-mail-setup-hook)
   (mail-position-on-field "To"))
@@ -5017,7 +5017,7 @@ Use function list is `wl-summary-write-current-folder-functions'."
     (wl-draft (nth 0 guess-list) nil nil ; To:
              (nth 1 guess-list) nil    ; Cc:
              (nth 2 guess-list)        ; Newsgroups:
-             nil nil nil nil nil nil nil
+             nil nil nil nil nil nil
              folder)
     (run-hooks 'wl-mail-setup-hook)
     (mail-position-on-field "Subject")))