diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2012-08-21 01:23:57 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2012-08-21 01:23:57 +0000 |
commit | 891403f6d1b63dd2f82c4e67ff9a311308906f67 (patch) | |
tree | f8849383177b4c3dc7b972db9f60b797e47b1ae6 /lisp/gnus | |
parent | 6d74698e4bc745cf2f5e985b482371ab4a7c49e7 (diff) | |
download | emacs-891403f6d1b63dd2f82c4e67ff9a311308906f67.tar.gz |
gnus-msg.el (gnus-summary-resend-message): Honor posting-style for `name' and `address' in Resent-From header
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/gnus/gnus-msg.el | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index df35e998c31..7592c405076 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for + `name' and `address' in Resent-From header. + 2012-08-14 Chong Yidong <cyd@gnu.org> * gnus-art.el (article-display-face): Handle failure in diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 594f68bb86f..07748bebb81 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1369,7 +1369,21 @@ For the \"inline\" alternatives, also see the variable (nnmail-fetch-field "to")))) current-prefix-arg)) (let ((message-header-setup-hook (copy-sequence message-header-setup-hook)) - (message-sent-hook (copy-sequence message-sent-hook))) + (message-sent-hook (copy-sequence message-sent-hook)) + ;; Honor posting-style for `name' and `address' in Resent-From header. + (styles (gnus-group-find-parameter gnus-newsgroup-name + 'posting-style t)) + (user-full-name user-full-name) + (user-mail-address user-mail-address) + tem) + (dolist (style (if styles + (append gnus-posting-styles (list (cons ".*" styles))) + gnus-posting-styles)) + (when (string-match (pop style) gnus-newsgroup-name) + (when (setq tem (cadr (assq 'name style))) + (setq user-full-name tem)) + (when (setq tem (cadr (assq 'address style))) + (setq user-mail-address tem)))) ;; `gnus-summary-resend-message-insert-gcc' must run last. (add-hook 'message-header-setup-hook 'gnus-summary-resend-message-insert-gcc t) |