(auth-source-search): Only ask a single backend to create the credentials.
[gnus] / lisp / auth-source.el
index 239ebed..eede353 100644 (file)
@@ -552,15 +552,18 @@ must call it to obtain the actual value."
              (push (list backend match) matches)))))
       ;; If we didn't find anything, then we allow the backend(s) to
       ;; create the entries.
-      (unless matches
-       (let ((match (apply
-                     (slot-value backend 'search-function)
-                     :backend backend
-                     :create create
-                     :delete delete
-                     spec)))
-         (when match
-           (push (list backend match) matches))))
+      (when (and create
+                (not 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))