[gnus git] branch master updated: =1= Delete duplicate server names when getting credentials.

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  a0faaaf767280ba530f2c5c76fd25087581f62b8 (commit)
      from  47e91edc48785d0db45fd552e17a0a7a19a4e962 (commit)


- Log -----------------------------------------------------------------
commit a0faaaf767280ba530f2c5c76fd25087581f62b8
Author: Lars Ingebrigtsen <[email protected]>
Date:   Thu Feb 17 15:00:43 2011 -0800

    Delete duplicate server names when getting credentials.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 16247e0..d5fa15d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,15 @@
+2011-02-17  Lars Ingebrigtsen  <[email protected]>
+
+	* nnimap.el (nnimap-open-connection-1): Delete duplicate server names
+	when getting credentials.
+
+	* gnus-util.el (gnus-delete-duplicates): New function.
+
 2011-02-17  Teodor Zlatanov  <[email protected]>
 
 	* nnimap.el (nnimap-credentials): Instead of picking the first port as
-	a creation default, pass the whole port list down.  It will be completed.
+	a creation default, pass the whole port list down.  It will be
+	completed.
 
 	* auth-source.el (auth-source-search): Updated docs to talk about
 	multiple creation choices.
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index 67c4909..42dbd59 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -871,6 +871,15 @@ Bind `print-quoted' and `print-readably' to t, and `print-length' and
   (when (file-exists-p file)
     (delete-file file)))
 
+(defun gnus-delete-duplicates (list)
+  "Remove duplicate entries from LIST."
+  (let ((result nil))
+    (while list
+      (unless (member (car list) result)
+	(push (car list) result))
+      (pop list))
+    (nreverse result)))
+
 (defun gnus-delete-directory (directory)
   "Delete files in DIRECTORY.  Subdirectories remain.
 If there's no subdirectory, delete DIRECTORY as well."
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 2412546..7f8ecc1 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -384,9 +384,10 @@ textual parts.")
                                ;; Look for the credentials based on
                                ;; the virtual server name and the address
                                (nnimap-credentials
+				(gnus-delete-duplicates
                                 (list
                                  nnimap-address
-                                 (nnoo-current-server 'nnimap))
+				  (nnoo-current-server 'nnimap)))
                                 ports))))
 		  (setq nnimap-object nil)
 		(let ((nnimap-inhibit-logging 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    |   10 +++++++++-
 lisp/gnus-util.el |    9 +++++++++
 lisp/nnimap.el    |    7 ++++---
 3 files changed, 22 insertions(+), 4 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.