More fixes to not list ephemeral servers in the server buffer
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 9 Feb 2012 01:04:59 +0000 (02:04 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 9 Feb 2012 01:04:59 +0000 (02:04 +0100)
* gnus.el (gnus-server-extend-method): Don't add an -address component
if the method already has one (bug#9676).

lisp/ChangeLog
lisp/gnus.el

index dd8943d..145d16e 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-09  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus.el (gnus-server-extend-method): Don't add an -address component
+       if the method already has one (bug#9676).
+
 2012-02-08  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-summary-insert-old-articles): Use a default instead
index de4a5f9..8afb53b 100644 (file)
@@ -4122,12 +4122,17 @@ parameters."
   (if (or (not (inline (gnus-similar-server-opened method)))
          (not (cddr method)))
       method
-    (setq method
-         `(,(car method) ,(concat (cadr method) "+" group)
-           (,(intern (format "%s-address" (car method))) ,(cadr method))
-           ,@(cddr method)))
-    (push method gnus-extended-servers)
-    method))
+    (let ((address-slot
+          (intern (format "%s-address" (car method)))))
+      (setq method
+           (if (assq address-slot (cddr method))
+               `(,(car method) ,(concat (cadr method) "+" group)
+                 ,@(cddr method))
+             `(,(car method) ,(concat (cadr method) "+" group)
+               (,address-slot ,(cadr method))
+               ,@(cddr method))))
+      (push method gnus-extended-servers)
+      method)))
 
 (defun gnus-server-status (method)
   "Return the status of METHOD."