[gnus git] branch master updated: m0-5-87-gbf137c5 =1= gnus-msg.el (gnus-summary-resend-message): Honor posting-style for `name' and `address' in Resent-From header

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  bf137c512d98fb91898580f823a78fe4692ba0b7 (commit)
      from  b06a0d9eaf4e29598611623211efc53e6c80f963 (commit)


- Log -----------------------------------------------------------------
commit bf137c512d98fb91898580f823a78fe4692ba0b7
Author: Katsumi Yamaoka <[email protected]>
Date:   Tue Aug 21 01:23:39 2012 +0000

    gnus-msg.el (gnus-summary-resend-message): Honor posting-style for `name' and `address' in Resent-From header

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b439bc3..01c74b6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-21  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-msg.el (gnus-summary-resend-message): Honor posting-style for
+	`name' and `address' in Resent-From header.
+
 2012-08-14  Chong Yidong  <[email protected]>
 
 	* gnus-art.el (article-display-face): Handle failure in
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 594f68b..07748be 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/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)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    5 +++++
 lisp/gnus-msg.el |   16 +++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.