Use the existing auth sources, if any, for creation.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 12:27:55 +0000 (14:27 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 12:27:55 +0000 (14:27 +0200)
lisp/ChangeLog
lisp/auth-source.el

index 6210d65..bce9708 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * auth-source.el (auth-source-user-or-password): Use the existing auth
+       sources, if any, for creation.
+
        * gnus.el (gnus-group-fast-parameter): Return the last matching
        parameter instead of the first matching parameter.
 
index 6f4a4ac..c0464e2 100644 (file)
@@ -432,7 +432,10 @@ MODE can be \"login\" or \"password\"."
        ;; We haven't found something, so we will create it interactively.
        (when (and (not found) create-missing)
          (setq found (apply 'auth-source-create
-                            mode (car auth-sources) search)))
+                            mode (if choices
+                                     (car choices)
+                                   (car auth-sources))
+                            search)))
 
        ;; Cache the result.
        (when found