auth-source.el (auth-source-search): If we don't find a match, don't bug out on non...
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 18 Feb 2011 23:15:24 +0000 (23:15 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 18 Feb 2011 23:15:24 +0000 (23:15 +0000)
 (auth-source-search): Only ask a single backend to create the credentials.

lisp/gnus/ChangeLog
lisp/gnus/auth-source.el

index b40c6b7..af25eca 100644 (file)
@@ -2,6 +2,10 @@
 
        * auth-source.el (auth-source-search): Don't try to create credentials
        if the caller doesn't want that.
+       (auth-source-search): If we don't find a match, don't bug out on
+       non-bound variables.
+       (auth-source-search): Only ask a single backend to create the
+       credentials.
 
        * nnimap.el (nnimap-log-command): Add a newline to the inhibited
        logging.
index 4fdf521..c2f57ab 100644 (file)
@@ -544,14 +544,16 @@ must call it to obtain the actual value."
       ;; create the entries.
       (when (and create
                 (not matches))
-       (let ((match (apply
-                     (slot-value backend 'search-function)
-                     :backend backend
-                     :create create
-                     :delete delete
-                     spec)))
-         (when match
-           (push (list backend match) matches))))
+       (dolist (backend filtered-backends)
+         (unless matches
+           (let ((match (apply
+                         (slot-value backend 'search-function)
+                         :backend backend
+                         :create create
+                         :delete delete
+                         spec)))
+             (when match
+               (push (list backend match) matches))))))
 
       (setq backend (caar matches)
            found-here (cadar matches))