]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-msg.el (gnus-summary-resend-message): Honor posting-style for `name' and `addres...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 21 Aug 2012 01:23:57 +0000 (01:23 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 21 Aug 2012 01:23:57 +0000 (01:23 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-msg.el

index df35e998c31b68aedbd24f8a403df2b9e6393cd6..7592c405076b07402847cedade4f6d9873de81cf 100644 (file)
@@ -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
index 594f68bb86f9670225294b4ff7bcc39def020364..07748bebb81c8428f553e4ab72910df74ff391e5 100644 (file)
@@ -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)