diff options
| author | Vinicius Jose Latorre | 2007-08-09 01:41:08 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2007-08-09 01:41:08 +0000 |
| commit | 2540a3abbdc759f476f130f11ed8963a01c03fc1 (patch) | |
| tree | 3bde0355937fc575cc0f066a9a1dc773b6ac6948 | |
| parent | 219d320aabacef2ebfb8dc74c3695f9dea8a7f9a (diff) | |
| download | emacs-2540a3abbdc759f476f130f11ed8963a01c03fc1.tar.gz emacs-2540a3abbdc759f476f130f11ed8963a01c03fc1.zip | |
username and password default
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * url/url-auth.el (url-basic-auth): When prompting for username | ||
| 4 | and password, default to the username and password in the URL. | ||
| 5 | |||
| 1 | 2007-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2007-08-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * man.el: Remove spurious * in docstrings. | 8 | * 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." | |||
| 68 | (server (url-host href)) | 68 | (server (url-host href)) |
| 69 | (port (url-port href)) | 69 | (port (url-port href)) |
| 70 | (path (url-filename href)) | 70 | (path (url-filename href)) |
| 71 | user pass byserv retval data) | 71 | (user (url-user href)) |
| 72 | (pass (url-password href)) | ||
| 73 | byserv retval data) | ||
| 72 | (setq server (format "%s:%d" server port) | 74 | (setq server (format "%s:%d" server port) |
| 73 | path (cond | 75 | path (cond |
| 74 | (realm realm) | 76 | (realm realm) |
| @@ -79,8 +81,8 @@ instead of the pathname inheritance method." | |||
| 79 | (cond | 81 | (cond |
| 80 | ((and prompt (not byserv)) | 82 | ((and prompt (not byserv)) |
| 81 | (setq user (read-string (url-auth-user-prompt url realm) | 83 | (setq user (read-string (url-auth-user-prompt url realm) |
| 82 | (user-real-login-name)) | 84 | (or user (user-real-login-name))) |
| 83 | pass (read-passwd "Password: ")) | 85 | pass (read-passwd "Password: " nil (or pass ""))) |
| 84 | (set url-basic-auth-storage | 86 | (set url-basic-auth-storage |
| 85 | (cons (list server | 87 | (cons (list server |
| 86 | (cons path | 88 | (cons path |