diff options
| author | Richard M. Stallman | 1996-10-26 16:06:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-10-26 16:06:11 +0000 |
| commit | 037fa8ca99f4f1d3f55bc2a856df5aac9739985b (patch) | |
| tree | b797e83a8bde029c0561e25da34f9a20291f341d | |
| parent | 7c9097d02fd92884a28f002ad25d9f6baa07e35a (diff) | |
| download | emacs-037fa8ca99f4f1d3f55bc2a856df5aac9739985b.tar.gz emacs-037fa8ca99f4f1d3f55bc2a856df5aac9739985b.zip | |
(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.el | 50 |
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; | |||
| 2187 | prefix argument means ignore them. While composing the reply, | 2187 | prefix argument means ignore them. While composing the reply, |
| 2188 | use \\[mail-yank-original] to yank the original message into it." | 2188 | use \\[mail-yank-original] to yank the original message into it." |
| 2189 | (interactive "P") | 2189 | (interactive "P") |
| 2190 | (let (from reply-to cc subject date to message-id resent-reply-to | 2190 | (let (from reply-to cc subject date to message-id |
| 2191 | resent-to resent-cc resent-reply-to | ||
| 2191 | (msgnum rmail-current-message) | 2192 | (msgnum rmail-current-message) |
| 2192 | (rmail-buffer (current-buffer))) | 2193 | (rmail-buffer (current-buffer))) |
| 2193 | (save-excursion | 2194 | (save-excursion |
| @@ -2205,28 +2206,33 @@ use \\[mail-yank-original] to yank the original message into it." | |||
| 2205 | (narrow-to-region (point) | 2206 | (narrow-to-region (point) |
| 2206 | (progn (search-forward "\n*** EOOH ***\n") | 2207 | (progn (search-forward "\n*** EOOH ***\n") |
| 2207 | (beginning-of-line) (point)))) | 2208 | (beginning-of-line) (point)))) |
| 2208 | (setq resent-reply-to (mail-fetch-field "resent-reply-to" t) | 2209 | (setq from (mail-fetch-field "from") |
| 2209 | from (mail-fetch-field "from") | 2210 | reply-to (or (mail-fetch-field "reply-to" nil t) |
| 2210 | reply-to (or resent-reply-to | ||
| 2211 | (mail-fetch-field "reply-to" nil t) | ||
| 2212 | from) | 2211 | from) |
| 2213 | cc (cond (just-sender nil) | 2212 | cc (and (not just-sender) |
| 2214 | (resent-reply-to (mail-fetch-field "resent-cc" t)) | 2213 | (mail-fetch-field "cc" nil t)) |
| 2215 | (t (mail-fetch-field "cc" nil t))) | 2214 | subject (mail-fetch-field "subject") |
| 2216 | subject (or (and resent-reply-to | 2215 | date (mail-fetch-field "date") |
| 2217 | (mail-fetch-field "resent-subject" t)) | 2216 | to (or (mail-fetch-field "to" nil t) "") |
| 2218 | (mail-fetch-field "subject")) | 2217 | message-id (mail-fetch-field "message-id") |
| 2219 | date (or (and resent-reply-to | 2218 | resent-reply-to (mail-fetch-field "resent-reply-to" t) |
| 2220 | (mail-fetch-field "resent-date" t)) | 2219 | resent-cc (and (not just-sender) |
| 2221 | (mail-fetch-field "date")) | 2220 | (mail-fetch-field "resent-cc" nil t)) |
| 2222 | to (cond (resent-reply-to | 2221 | resent-to (or (mail-fetch-field "resent-to" nil t) "") |
| 2223 | (or (mail-fetch-field "resent-to" t)) "") | 2222 | ;;; resent-subject (mail-fetch-field "resent-subject") |
| 2224 | ((mail-fetch-field "to" nil t)) | 2223 | ;;; resent-date (mail-fetch-field "resent-date") |
| 2225 | ;((mail-fetch-field "apparently-to")) ack gag barf | 2224 | ;;; resent-message-id (mail-fetch-field "resent-message-id") |
| 2226 | (t "")) | 2225 | ))) |
| 2227 | message-id (cond (resent-reply-to | 2226 | ;; Merge the resent-to and resent-cc into the to and cc. |
| 2228 | (mail-fetch-field "resent-message-id" t)) | 2227 | (if (and resent-to (not (equal resent-to ""))) |
| 2229 | ((mail-fetch-field "message-id")))))) | 2228 | (if (not (equal to "")) |
| 2229 | (setq to (concat to ", " resent-to)) | ||
| 2230 | (setq to resent-to))) | ||
| 2231 | (if (and resent-cc (not (equal resent-cc ""))) | ||
| 2232 | (if (not (equal cc "")) | ||
| 2233 | (setq cc (concat cc ", " resent-cc)) | ||
| 2234 | (setq cc resent-cc))) | ||
| 2235 | ;; Add `Re: ' to subject if not there already. | ||
| 2230 | (and (stringp subject) | 2236 | (and (stringp subject) |
| 2231 | (setq subject | 2237 | (setq subject |
| 2232 | (concat rmail-reply-prefix | 2238 | (concat rmail-reply-prefix |