Improve default auth-source creation prompts as suggested in bug #8050.
authorTed Zlatanov <tzz@lifelogs.com>
Tue, 8 Mar 2011 21:56:36 +0000 (15:56 -0600)
committerTed Zlatanov <tzz@lifelogs.com>
Tue, 8 Mar 2011 21:56:36 +0000 (15:56 -0600)
* auth-source.el (auth-source-netrc-create): Set up clearer default
prompts for user, host, port, and secret.

lisp/ChangeLog
lisp/auth-source.el

index 7b44768..fe7a385 100644 (file)
@@ -15,7 +15,8 @@
        deletions.
        (auth-source-netrc-create): Take user login name as default in user
        prompt.  Move all the save functionality to a lexically bound function
-       under the :save-function token in the returned list.
+       under the :save-function token in the returned list.  Set up clearer
+       default prompts for user, host, port, and secret.
        (auth-source-netrc-saver): New function, intended to be wrapped for
        :save-function.
 
index 24d4fad..53a97ca 100644 (file)
@@ -1056,10 +1056,10 @@ See `auth-source-search' for details on SPEC."
                                          "[any port]"))))
              (prompt (or (aget auth-source-creation-prompts r)
                          (case r
-                           ('secret "%p password for user %u, host %h: ")
-                           ('user "%p user name: ")
-                           ('host "%p host name for user %u: ")
-                           ('port "%p port for user %u and host %h: "))
+                           (secret "%p password for %u@%h: ")
+                           (user "%p user name for %h: ")
+                           (host "%p host name for user %u: ")
+                           (port "%p port for %u@%h: "))
                          (format "Enter %s (%%u@%%h:%%p): " r)))
              (prompt (auth-source-format-prompt
                       prompt