]> git.eshelyaron.com Git - emacs.git/commitdiff
username and password default
authorVinicius Jose Latorre <viniciusjl@ig.com.br>
Thu, 9 Aug 2007 01:41:08 +0000 (01:41 +0000)
committerVinicius Jose Latorre <viniciusjl@ig.com.br>
Thu, 9 Aug 2007 01:41:08 +0000 (01:41 +0000)
lisp/ChangeLog
lisp/url/url-auth.el

index ae2e80bd3060adcc197aeb7c3e289f22294051ad..07e268e5036ba7ff8c7c7c3f1e40d3a8f15e8934 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-09  Edward O'Connor  <hober0@gmail.com> (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  <monnier@iro.umontreal.ca>
 
        * man.el: Remove spurious * in docstrings.
index 030409c339150338955afcc200b4f9a8c6fc301a..3c33fd914e5079280c10c5e346625f30d56192d0 100644 (file)
@@ -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