* message.el (message-get-reply-headers): Delete all duplicates, instead of the first.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 2 Jul 2011 20:52:31 +0000 (22:52 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 2 Jul 2011 20:52:31 +0000 (22:52 +0200)
lisp/ChangeLog
lisp/message.el

index 2628a3b..9bd709f 100644 (file)
@@ -1,5 +1,8 @@
 2011-07-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * message.el (message-get-reply-headers): Delete all duplicates,
+       instead of the first.
+
        * gnus-msg.el (gnus-configure-posting-styles): Get the local
        gnus-posting-style value from the summary buffer to make it easier to
        make that a per-buffer conf.
index 0a45376..f6e8fbe 100644 (file)
@@ -6793,10 +6793,12 @@ want to get rid of this query permanently.")))
                                  addr))
                 (cons (downcase (mail-strip-quoted-names addr)) addr)))
             (message-tokenize-header recipients)))
-      ;; Remove first duplicates.  (Why not all duplicates?  Is this a bug?)
+      ;; Remove all duplicates.
       (let ((s recipients))
        (while s
-         (setq recipients (delq (assoc (car (pop s)) s) recipients))))
+         (let ((address (car (pop s))))
+           (while (assoc address s)
+             (setq recipients (delq (assoc address s) recipients))))))
 
       ;; Remove hierarchical lists that are contained within each other,
       ;; if message-hierarchical-addresses is defined.