# HG changeset patch # User Vinicius Jose Latorre # Date 1186623668 0 # Node ID 364329b928dc9fe72b583baec7a83503f79ff5aa # Parent c3783c0f33984eb5542876c077cded33587e0054 username and password default diff -r c3783c0f3398 -r 364329b928dc lisp/ChangeLog --- a/lisp/ChangeLog Wed Aug 08 21:14:52 2007 +0000 +++ b/lisp/ChangeLog Thu Aug 09 01:41:08 2007 +0000 @@ -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 -r c3783c0f3398 -r 364329b928dc lisp/url/url-auth.el --- a/lisp/url/url-auth.el Wed Aug 08 21:14:52 2007 +0000 +++ b/lisp/url/url-auth.el Thu Aug 09 01:41:08 2007 +0000 @@ -68,7 +68,9 @@ (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 @@ (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