From 219e1b4f2ae915ca712ed4fb049dde83cf3f6a35 Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Sun, 13 Mar 2011 09:00:37 -0500 Subject: [PATCH] Show the default in the prompt when prompting for token creation. * auth-source.el (auth-source-netrc-create): Show the default in the prompt when prompting for token creation. --- lisp/ChangeLog | 5 +++++ lisp/auth-source.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74fbc6b65..9af5af4b4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-13 Teodor Zlatanov + + * auth-source.el (auth-source-netrc-create): Show the default in the + prompt when prompting for token creation. + 2011-03-12 Teodor Zlatanov * auth-source.el (auth-source-format-prompt): Always convert the value diff --git a/lisp/auth-source.el b/lisp/auth-source.el index d82e082e7..dd1b83d79 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -1110,6 +1110,10 @@ See `auth-source-search' for details on SPEC." ;; special case prompt for passwords (read-passwd prompt)) ((null data) + (when default + (setq + prompt + (concat prompt (format "(default %s) " default)))) (read-string prompt nil nil default)) (t (or data default)))) -- 2.25.1