(auth-source-search): Only ask a single backend to create the credentials.
[gnus] / lisp / auth-source.el
index 64d244b..eede353 100644 (file)
@@ -555,14 +555,15 @@ must call it to obtain the actual value."
       (when (and create
                 (not matches))
        (dolist (backend filtered-backends)
-         (let ((match (apply
-                       (slot-value backend 'search-function)
-                       :backend backend
-                       :create create
-                       :delete delete
-                       spec)))
-           (when match
-             (push (list backend match) matches)))))
+         (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))