(auth-source-search): Don't try to create credentials if the caller doesn't want...
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 18 Feb 2011 00:45:49 +0000 (16:45 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 18 Feb 2011 00:45:49 +0000 (16:45 -0800)
lisp/ChangeLog
lisp/auth-source.el

index 147a757..49764d1 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-18  Lars Ingebrigtsen  <larsi@gnus.org>
 
 2011-02-18  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * 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.
        * nnimap.el (nnimap-log-command): Add a newline to the inhibited
        logging.
        (nnimap-credentials): Protect against auth-source-search returning nil.
index 239ebed..6e6f962 100644 (file)
@@ -552,7 +552,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.
              (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
        (let ((match (apply
                      (slot-value backend 'search-function)
                      :backend backend