From 3804652098c7c8824f332e92846a3b8896b9e683 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 18 Feb 2011 01:48:21 +0000 Subject: [PATCH] auth-source.el (auth-source-search): Don't try to create credentials if the caller doesn't want that. --- lisp/gnus/ChangeLog | 3 +++ lisp/gnus/auth-source.el | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 28533e9ab22..b40c6b7d60f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,8 @@ 2011-02-18 Lars Ingebrigtsen + * auth-source.el (auth-source-search): Don't try to create credentials + if the caller doesn't want that. + * nnimap.el (nnimap-log-command): Add a newline to the inhibited logging. (nnimap-credentials): Protect against auth-source-search returning nil. diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 0bfb55aedd1..4fdf521b1a9 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -542,7 +542,8 @@ 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 + (when (and create + (not matches)) (let ((match (apply (slot-value backend 'search-function) :backend backend -- 2.39.2