* wl-draft.el (wl-draft-reply-list-symbol): Remove FROM argument.
authorkaoru <kaoru>
Sat, 27 Jan 2001 05:04:24 +0000 (05:04 +0000)
committerkaoru <kaoru>
Sat, 27 Jan 2001 05:04:24 +0000 (05:04 +0000)
Argument WITH-ARG instead of NO-ARG (negative mean).
(wl-draft-reply): WITH-ARG instead of NO-ARG.
* wl-summary.el (wl-summary-reply): Fixed `wl-draft-reply' call point.
* wl-message.el (wl-message-follow-current-entity): Likewise.

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

index bb23f47..2e9c732 100644 (file)
@@ -1,3 +1,11 @@
+2001-01-27  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-draft.el (wl-draft-reply-list-symbol): Remove FROM argument.
+       Argument WITH-ARG instead of NO-ARG (negative mean).
+       (wl-draft-reply): WITH-ARG instead of NO-ARG.
+       * wl-summary.el (wl-summary-reply): Fixed `wl-draft-reply' call point.
+       * wl-message.el (wl-message-follow-current-entity): Likewise.
+
 2001-01-26  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-draft.el (wl-draft-reply-list-symbol): Change argument order.
index 5ce0324..da07072 100644 (file)
       (substring subject (match-end 0))
     subject))
 
-(defun wl-draft-reply-list-symbol (no-arg &optional from)
-  "Select `wl-draft-reply-*-argument-list' from condition NO-ARG and FROM.
-Return symbol `wl-draft-reply-*-argument-list' (not value).
-When FROM is nil, use (std11-field-body \"From\") instead."
-  (if (wl-address-user-mail-address-p (or from (std11-field-body "From")))
-      (if no-arg
-         'wl-draft-reply-myself-without-argument-list
-       'wl-draft-reply-myself-with-argument-list)
-    (if no-arg
-       'wl-draft-reply-without-argument-list
-      'wl-draft-reply-with-argument-list)))
-
-(defun wl-draft-reply (buf no-arg summary-buf)
-  ""
+(defun wl-draft-reply-list-symbol (with-arg)
+  "Return symbol `wl-draft-reply-*-argument-list' match condition.
+Check WITH-ARG and From: field."
+  (if (wl-address-user-mail-address-p (or (elmo-field-body "From") ""))
+      (if with-arg
+         'wl-draft-reply-myself-with-argument-list
+       'wl-draft-reply-myself-without-argument-list)
+    (if with-arg
+       'wl-draft-reply-with-argument-list
+      'wl-draft-reply-without-argument-list)))
+
+(defun wl-draft-reply (buf with-arg summary-buf)
+  "Reply to BUF buffer message.
+Reply to author if WITH-ARG is non-nil."
 ;;;(save-excursion
   (let (r-list
        to mail-followup-to cc subject in-reply-to references newsgroups
-       from to-alist cc-alist r-list-name decoder)
+       from to-alist cc-alist decoder)
     (set-buffer buf)
-    (setq from (wl-address-header-extract-address (std11-field-body "From")))
-    ;; symbol-name use in error message
-    (setq r-list-name (symbol-name (wl-draft-reply-list-symbol no-arg from)))
-    (setq r-list (symbol-value (wl-draft-reply-list-symbol no-arg from)))
+    (setq r-list (symbol-value (wl-draft-reply-list-symbol with-arg)))
     (catch 'done
       (while r-list
        (when (let ((condition (car (car r-list))))
@@ -314,7 +311,8 @@ When FROM is nil, use (std11-field-body \"From\") instead."
                                             ",")))
          (throw 'done nil))
        (setq r-list (cdr r-list)))
-      (error "No match field: check your `%s'" r-list-name))
+      (error "No match field: check your `%s'"
+            (symbol-name (wl-draft-reply-list-symbol with-arg))))
     (setq subject (std11-field-body "Subject"))
     (setq to (wl-parse-addresses to)
          cc (wl-parse-addresses cc))
@@ -351,12 +349,10 @@ When FROM is nil, use (std11-field-body \"From\") instead."
     ;; and myself is contained in cc,
     ;; delete myself from cc.
     (setq cc (wl-draft-delete-myself-from-cc to cc))
-    (if wl-insert-mail-followup-to
-       (progn
-         (setq mail-followup-to
-               (wl-draft-make-mail-followup-to (append to cc)))
-         (setq mail-followup-to (wl-delete-duplicates mail-followup-to
-                                                      nil t))))
+    (when wl-insert-mail-followup-to
+      (setq mail-followup-to
+           (wl-draft-make-mail-followup-to (append to cc)))
+      (setq mail-followup-to (wl-delete-duplicates mail-followup-to nil t)))
     (setq newsgroups (wl-parse newsgroups
                               "[ \t\f\r\n,]*\\([^ \t\f\r\n,]+\\)")
          newsgroups (wl-delete-duplicates newsgroups)
index 63ba80a..f90ca1d 100644 (file)
 (defun wl-message-follow-current-entity (buffer)
   "Follow to current message."
   (wl-draft-reply (wl-message-get-original-buffer)
-                 'to-all wl-message-buffer-cur-summary-buffer)
+                 nil wl-message-buffer-cur-summary-buffer) ; reply to all
   (let ((mail-reply-buffer buffer))
     (wl-draft-yank-from-mail-reply-buffer nil)))
 
index b84664c..6dbd833 100644 (file)
@@ -5076,7 +5076,7 @@ Reply to author if invoked with ARG."
                  (split-window-vertically))
              (other-window 1)
              (when (setq mes-buf (wl-message-get-original-buffer))
-               (wl-draft-reply mes-buf (not arg) summary-buf)
+               (wl-draft-reply mes-buf arg summary-buf)
                (unless without-setup-hook
                  (run-hooks 'wl-mail-setup-hook)))
              t)))))