# HG changeset patch # User Glenn Morris # Date 1235960364 0 # Node ID a2de015c936d3e399a4ebc870626b9de080af6d1 # Parent c61c29e47d6af6a129ed2912db3c39cc10e0c67c (rmail-reply): Use rmail-apply-in-message so that this function has access to all the headers, not just the visible ones. diff -r c61c29e47d6a -r a2de015c936d lisp/ChangeLog --- a/lisp/ChangeLog Sun Mar 01 19:24:15 2009 +0000 +++ b/lisp/ChangeLog Mon Mar 02 02:19:24 2009 +0000 @@ -1,3 +1,8 @@ +2009-03-02 Glenn Morris + + * mail/rmail.el (rmail-reply): Use rmail-apply-in-message so that this + function has access to all the headers, not just the visible ones. + 2009-03-01 Chong Yidong * abbrev.el (clear-abbrev-table): Always return nil (Bug#2515). diff -r c61c29e47d6a -r a2de015c936d lisp/mail/rmail.el --- a/lisp/mail/rmail.el Sun Mar 01 19:24:15 2009 +0000 +++ b/lisp/mail/rmail.el Mon Mar 02 02:19:24 2009 +0000 @@ -3300,45 +3300,35 @@ (let (from reply-to cc subject date to message-id references resent-to resent-cc resent-reply-to (msgnum rmail-current-message)) - (save-excursion - (save-restriction - (widen) - (if (rmail-buffers-swapped-p) - (narrow-to-region - (goto-char (point-min)) - (search-forward "\n\n" nil 'move)) - (goto-char (rmail-msgbeg rmail-current-message)) - (forward-line 1) - (narrow-to-region - (point) - (search-forward "\n\n" - (rmail-msgend rmail-current-message) - 'move))) - (setq from (mail-fetch-field "from") - reply-to (or (mail-fetch-field "mail-reply-to" nil t) - (mail-fetch-field "reply-to" nil t) - from) - subject (mail-fetch-field "subject") - date (mail-fetch-field "date") - message-id (mail-fetch-field "message-id") - references (mail-fetch-field "references" nil nil t) - resent-reply-to (mail-fetch-field "resent-reply-to" nil t) - ;; Bug#512. It's inappropriate to reply to these addresses. -;;; 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") - ) - (unless just-sender - (if (mail-fetch-field "mail-followup-to" nil t) - ;; If this header field is present, use it instead of - ;; the To and CC fields. - (setq to (mail-fetch-field "mail-followup-to" nil t)) - (setq cc (or (mail-fetch-field "cc" nil t) "") - to (or (mail-fetch-field "to" nil t) "")))))) - + (rmail-apply-in-message + rmail-current-message + (lambda () + (search-forward "\n\n" nil 'move) + (narrow-to-region (point-min) (point)) + (setq from (mail-fetch-field "from") + reply-to (or (mail-fetch-field "mail-reply-to" nil t) + (mail-fetch-field "reply-to" nil t) + from) + subject (mail-fetch-field "subject") + date (mail-fetch-field "date") + message-id (mail-fetch-field "message-id") + references (mail-fetch-field "references" nil nil t) + resent-reply-to (mail-fetch-field "resent-reply-to" nil t) + ;; Bug#512. It's inappropriate to reply to these addresses. +;;; 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") + ) + (unless just-sender + (if (mail-fetch-field "mail-followup-to" nil t) + ;; If this header field is present, use it instead of the + ;; To and CC fields. + (setq to (mail-fetch-field "mail-followup-to" nil t)) + (setq cc (or (mail-fetch-field "cc" nil t) "") + to (or (mail-fetch-field "to" nil t) "")))))) ;; Merge the resent-to and resent-cc into the to and cc. ;; Bug#512. It's inappropriate to reply to these addresses. ;;; (if (and resent-to (not (equal resent-to "")))