changeset 16467:446f51ea7cb8

(rmail-reply): Merge resent-to and resent-cc into to and cc. Ignore the resent- fields aside from that.
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Oct 1996 16:06:11 +0000
parents 2c5c58435c00
children 0927028baa82
files lisp/mail/rmail.el
diffstat 1 files changed, 28 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Sat Oct 26 16:05:58 1996 +0000
+++ b/lisp/mail/rmail.el	Sat Oct 26 16:06:11 1996 +0000
@@ -2187,7 +2187,8 @@
 prefix argument means ignore them.  While composing the reply,
 use \\[mail-yank-original] to yank the original message into it."
   (interactive "P")
-  (let (from reply-to cc subject date to message-id resent-reply-to
+  (let (from reply-to cc subject date to message-id
+	     resent-to resent-cc resent-reply-to
 	     (msgnum rmail-current-message)
 	     (rmail-buffer (current-buffer)))
     (save-excursion
@@ -2205,28 +2206,33 @@
 	  (narrow-to-region (point)
 			    (progn (search-forward "\n*** EOOH ***\n")
 				   (beginning-of-line) (point))))
-	(setq resent-reply-to (mail-fetch-field "resent-reply-to" t)
-	      from (mail-fetch-field "from")
-	      reply-to (or resent-reply-to
-			   (mail-fetch-field "reply-to" nil t)
+	(setq from (mail-fetch-field "from")
+	      reply-to (or (mail-fetch-field "reply-to" nil t)
 			   from)
-	      cc (cond (just-sender nil)
-		       (resent-reply-to (mail-fetch-field "resent-cc" t))
-		       (t (mail-fetch-field "cc" nil t)))
-	      subject (or (and resent-reply-to
-			       (mail-fetch-field "resent-subject" t))
-			  (mail-fetch-field "subject"))
-	      date (or (and resent-reply-to
-			    (mail-fetch-field "resent-date" t))
-		       (mail-fetch-field "date"))
-	      to (cond (resent-reply-to
-			(or (mail-fetch-field "resent-to" t)) "")
-		       ((mail-fetch-field "to" nil t))
-		       ;((mail-fetch-field "apparently-to")) ack gag barf
-		       (t ""))
-	      message-id (cond (resent-reply-to
-				(mail-fetch-field "resent-message-id" t))
-			       ((mail-fetch-field "message-id"))))))
+	      cc (and (not just-sender)
+		      (mail-fetch-field "cc" nil t))
+	      subject (mail-fetch-field "subject")
+	      date (mail-fetch-field "date")
+	      to (or (mail-fetch-field "to" nil t) "")
+	      message-id (mail-fetch-field "message-id")
+	      resent-reply-to (mail-fetch-field "resent-reply-to" t)
+	      resent-cc (and (not just-sender)
+			     (mail-fetch-field "resent-cc" nil t))
+	      resent-to (or (mail-fetch-field "resent-to" nil t) "")
+;;;	      resent-subject (mail-fetch-field "resent-subject")
+;;;	      resent-date (mail-fetch-field "resent-date")
+;;;	      resent-message-id (mail-fetch-field "resent-message-id")
+	      )))
+    ;; Merge the resent-to and resent-cc into the to and cc.
+    (if (and resent-to (not (equal resent-to "")))
+	(if (not (equal to ""))
+	    (setq to (concat to ", " resent-to))
+	  (setq to resent-to)))
+    (if (and resent-cc (not (equal resent-cc "")))
+	(if (not (equal cc ""))
+	    (setq cc (concat cc ", " resent-cc))
+	  (setq cc resent-cc)))
+    ;; Add `Re: ' to subject if not there already.
     (and (stringp subject)
 	 (setq subject
 	       (concat rmail-reply-prefix