From e5ad86dea7f6657896a5f3a75f578bb5668244fd Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 18 Feb 2011 14:07:53 -0800 Subject: [PATCH] If we don't find a match, don't bug out on non-bound variables. --- lisp/ChangeLog | 2 ++ lisp/auth-source.el | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49764d15e..67faeacaa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * 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. * 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 6e6f962d6..64d244bea 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -554,14 +554,15 @@ 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) + (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