* wl-draft.el (wl-draft-insert-current-message): Also check
authoryoichi <yoichi>
Mon, 17 May 2004 15:20:41 +0000 (15:20 +0000)
committeryoichi <yoichi>
Mon, 17 May 2004 15:20:41 +0000 (15:20 +0000)
summary buffer, remove unnecessary tag.

wl/ChangeLog
wl/wl-draft.el

index 0787123..08d4aac 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-18  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-draft.el (wl-draft-insert-current-message): Also check
+       summary buffer, remove unnecessary tag.
+
 2004-05-17  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-draft.el (wl-draft-insert-current-message): Cause error also
index e941803..3d53e37 100644 (file)
@@ -637,17 +637,22 @@ Reply to author if WITH-ARG is non-nil."
        mail-citation-hook mail-yank-hooks
        wl-draft-add-references wl-draft-add-in-reply-to
        wl-draft-cite-function)
-    (with-current-buffer wl-draft-buffer-cur-summary-buffer
-      (when (or (not wl-message-buffer)
-               (with-current-buffer wl-message-buffer
-                 (setq original-buffer (wl-message-get-original-buffer))
-                 (zerop (with-current-buffer original-buffer
-                          (buffer-size)))))
-       (error "No current message")))
-    (setq mail-reply-buffer original-buffer)
-    (wl-draft-yank-from-mail-reply-buffer
-     nil
-     wl-ignored-forwarded-headers)))
+    (if (and wl-draft-buffer-cur-summary-buffer
+            (with-current-buffer wl-draft-buffer-cur-summary-buffer
+              (and wl-message-buffer
+                   (with-current-buffer wl-message-buffer
+                     (setq original-buffer (wl-message-get-original-buffer))
+                     (not (zerop (with-current-buffer original-buffer
+                                   (buffer-size))))))))
+       (progn
+         (setq mail-reply-buffer original-buffer)
+         (wl-draft-yank-from-mail-reply-buffer
+          nil
+          wl-ignored-forwarded-headers))
+      (when (string= (mime-make-tag "message" "rfc822")
+                    (buffer-substring-no-properties (point-at-bol 0)(point-at-eol 0)))
+       (delete-region (point-at-bol 0) (1+ (point-at-eol 0))))
+      (error "No current message"))))
 
 (defun wl-draft-insert-get-message (dummy)
   (let ((fld (completing-read