summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-10-26 16:06:11 +0000
committerRichard M. Stallman <rms@gnu.org>1996-10-26 16:06:11 +0000
commitc9b85b90495122a9498fa5526610d087611a66ec (patch)
tree87b96e2adf8299f9dc82874b86872113c6f3e355
parent58d9d44e34de8bcbbd45846c037099cbb5daf857 (diff)
downloademacs-c9b85b90495122a9498fa5526610d087611a66ec.tar.gz
(rmail-reply): Merge resent-to and resent-cc into to and cc.
Ignore the resent- fields aside from that.
-rw-r--r--lisp/mail/rmail.el50
1 files changed, 28 insertions, 22 deletions
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