* wl-draft.el (wl-draft-doing-mime-bcc): New variable.
authorteranisi <teranisi>
Mon, 20 May 2002 13:41:00 +0000 (13:41 +0000)
committerteranisi <teranisi>
Mon, 20 May 2002 13:41:00 +0000 (13:41 +0000)
(wl-draft-do-mime-bcc): Bind wl-draft-doing-mime-bcc to avoid
infinite loop.

wl/ChangeLog
wl/wl-draft.el

index f7fcba4..547409c 100644 (file)
@@ -1,7 +1,10 @@
-2002-05-20  Yuuichi Teranishi  <teranisi@gohome.org>
+2002-05-20  Yuuichi Teranishi  <teranisi@ns.templewest.net>
 
        * wl-draft.el (wl-draft-do-mime-bcc): Use generate-new-buffer and
        insert-buffer instead of clone-buffer.
+       (wl-draft-doing-mime-bcc): New variable.
+       (wl-draft-do-mime-bcc): Bind wl-draft-doing-mime-bcc to avoid
+       infinite loop.
 
        * wl-vars.el (wl-draft-mime-bcc-field-name): New user option.
        (wl-draft-mime-bcc-body): Ditto.
index 990ddb0..0c32b6c 100644 (file)
@@ -74,6 +74,7 @@
 (defvar wl-draft-reply-buffer nil)
 (defvar wl-draft-forward nil)
 (defvar wl-draft-parent-folder nil)
+(defvar wl-draft-doing-mime-bcc nil)
 
 (defvar wl-draft-config-sub-func-alist
   '((body              . wl-draft-config-sub-body)
@@ -1296,14 +1297,16 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
        (recipients (wl-parse-addresses field-body))
        (draft-buffer (current-buffer))
        buffer)
-    (when (not (zerop (length field-body)))
+    (when (and (not wl-draft-doing-mime-bcc) ; To avoid infinite loop.
+              (not (zerop (length field-body))))
       (with-current-buffer (setq buffer (generate-new-buffer 
                                         " *temporary buffer for mime bcc*"))
        (insert-buffer draft-buffer))
       (unwind-protect
          (dolist (recipient recipients)
            (with-temp-buffer
-             (let (mail-citation-hook 
+             (let ((wl-draft-doing-mime-bcc t)
+                   mail-citation-hook 
                    mail-yank-hooks
                    wl-draft-add-references
                    wl-draft-add-in-reply-to