From: Richard M. Stallman Date: Sat, 26 Oct 1996 16:06:11 +0000 (+0000) Subject: (rmail-reply): Merge resent-to and resent-cc into to and cc. X-Git-Tag: emacs-20.1~3477 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=037fa8ca99f4f1d3f55bc2a856df5aac9739985b;p=emacs.git (rmail-reply): Merge resent-to and resent-cc into to and cc. Ignore the resent- fields aside from that. --- diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index f38b1a8c615..2b5caaf3e7e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2187,7 +2187,8 @@ Normally include CC: to all other recipients of original message; 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 @@ use \\[mail-yank-original] to yank the original message into it." (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