(gnus-server-to-method): Return server matching first in gnus-newsrc-alist.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 23 Oct 2007 12:33:53 +0000 (12:33 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 23 Oct 2007 12:33:53 +0000 (12:33 +0000)
lisp/ChangeLog
lisp/gnus.el

index 427a0db..7d61e3b 100644 (file)
@@ -1,5 +1,8 @@
 2007-10-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus.el (gnus-server-to-method): Return server matching first in
+       gnus-newsrc-alist.
+
        * gnus-art.el (gnus-article-highlight-signature)
        (gnus-insert-prev-page-button, gnus-insert-next-page-button): Make a
        button overlay without the front stickiness.
index 1ad2403..0a7231a 100644 (file)
@@ -3580,15 +3580,14 @@ that that variable is buffer-local to the summary buffers."
              ;; of every method.  As a side-effect, loads the
              ;; gnus-server-method-cache so this only happens once,
              ;; if at all.
-             (let (match)
-               (mapcar
-                (lambda (info)
-                  (let ((info-method (gnus-info-method info)))
-                    (unless (stringp info-method)
-                      (let ((info-server (gnus-method-to-server info-method)))
-                        (when (equal server info-server)
-                          (setq match info-method))))))
-                (cdr gnus-newsrc-alist))
+             (let ((alist (cdr gnus-newsrc-alist))
+                   method match)
+               (while alist
+                 (setq method (gnus-info-method (pop alist)))
+                 (when (and (not (stringp method))
+                            (equal server (gnus-method-to-server method)))
+                   (setq match method
+                         alist nil)))
                match))))
        (when result
          (push (cons server result) gnus-server-method-cache))