From 82f3e557de7ffb57fce527be64009239d084db77 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 18 Feb 2011 14:09:56 -0800 Subject: [PATCH] (auth-source-search): Only ask a single backend to create the credentials. --- lisp/ChangeLog | 2 ++ lisp/auth-source.el | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67faeacaa..b7d4d0092 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ 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. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 64d244bea..eede35335 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -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)) -- 2.25.1