* wl-draft.el (wl-draft-insert-current-message): Cause error also
authoryoichi <yoichi>
Mon, 17 May 2004 14:34:24 +0000 (14:34 +0000)
committeryoichi <yoichi>
Mon, 17 May 2004 14:34:24 +0000 (14:34 +0000)
when wl-message-buffer is nil.

wl/ChangeLog
wl/wl-draft.el

index fd5f545..0787123 100644 (file)
@@ -1,5 +1,8 @@
 2004-05-17  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
+       * wl-draft.el (wl-draft-insert-current-message): Cause error also
+       when wl-message-buffer is nil.
+
        * wl-folder.el (wl-folder): Abolish unused argument.
        Call wl-folder-init when wl-folder-entity is nil.
        * wl.el (wl): Change accordingly.
index f376f4c..e941803 100644 (file)
@@ -638,12 +638,12 @@ Reply to author if WITH-ARG is non-nil."
        wl-draft-add-references wl-draft-add-in-reply-to
        wl-draft-cite-function)
     (with-current-buffer wl-draft-buffer-cur-summary-buffer
-      (with-current-buffer wl-message-buffer
-       (setq original-buffer (wl-message-get-original-buffer))
-       (if (zerop
-            (with-current-buffer original-buffer
-              (buffer-size)))
-           (error "No current message"))))
+      (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