From: Lars Magne Ingebrigtsen Date: Sat, 18 Sep 2010 01:12:41 +0000 (+0200) Subject: In the password prompt, say what we're querying for. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=9ba5fda3a101b1953bd9c03fe9c1e68ed20dc41e In the password prompt, say what we're querying for. Also prompt for user name if that hasn't been given. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46b90032f..4268e1384 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2010-09-18 Lars Magne Ingebrigtsen + * auth-source.el (auth-source-create): In the password prompt, say what + we're querying for. Also prompt for user name if that hasn't been + given. + * nnimap.el (nnimap-with-process-buffer): Removed. 2010-09-17 Lars Magne Ingebrigtsen diff --git a/lisp/auth-source.el b/lisp/auth-source.el index a86d8d871..a0be0ca8b 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -312,20 +312,23 @@ Return structure as specified by MODE." (setq result (mapcar (lambda (m) - (if (equal "password" m) - (let ((passwd (read-passwd "Password: "))) - (cond - ;; Secret Service API. - ((consp source) - (apply - 'secrets-create-item - (auth-get-source entry) name passwd spec)) - (t)) ;; netrc not implemented yes. - passwd) - (or - ;; the originally requested :user - user - "unknown-user"))) + (cond + ((equal "password" m) + (let ((passwd (read-passwd + (format "Password for %s on %s: " prot host)))) + (cond + ;; Secret Service API. + ((consp source) + (apply + 'secrets-create-item + (auth-get-source entry) name passwd spec)) + (t)) ;; netrc not implemented yes. + passwd)) + ((equal "login" m) + (or user + (read-string (format "User name for %s on %s: " prot host)))) + (t + "unknownuser"))) (if (consp mode) mode (list mode)))) (if (consp mode) result (car result))))