From 2540a3abbdc759f476f130f11ed8963a01c03fc1 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Thu, 9 Aug 2007 01:41:08 +0000 Subject: [PATCH] username and password default --- lisp/ChangeLog | 5 +++++ lisp/url/url-auth.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae2e80bd306..07e268e5036 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-09 Edward O'Connor (tiny change) + + * url/url-auth.el (url-basic-auth): When prompting for username + and password, default to the username and password in the URL. + 2007-08-08 Stefan Monnier * man.el: Remove spurious * in docstrings. diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 030409c3391..3c33fd914e5 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -68,7 +68,9 @@ instead of the pathname inheritance method." (server (url-host href)) (port (url-port href)) (path (url-filename href)) - user pass byserv retval data) + (user (url-user href)) + (pass (url-password href)) + byserv retval data) (setq server (format "%s:%d" server port) path (cond (realm realm) @@ -79,8 +81,8 @@ instead of the pathname inheritance method." (cond ((and prompt (not byserv)) (setq user (read-string (url-auth-user-prompt url realm) - (user-real-login-name)) - pass (read-passwd "Password: ")) + (or user (user-real-login-name))) + pass (read-passwd "Password: " nil (or pass ""))) (set url-basic-auth-storage (cons (list server (cons path -- 2.39.2