mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
(auth-source-user-or-password): Remove unnecessary eval-and-compile.
This commit is contained in:
parent
408b8ab461
commit
8705576eab
@ -1,3 +1,8 @@
|
|||||||
|
2008-06-07 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* url-auth.el (auth-source-user-or-password): Remove unnecessary
|
||||||
|
eval-and-compile.
|
||||||
|
|
||||||
2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
|
2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
* url-handlers.el (url-file-name-completion): Add missing argument.
|
* url-handlers.el (url-file-name-completion): Add missing argument.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
;;; url-auth.el --- Uniform Resource Locator authorization modules
|
;;; url-auth.el --- Uniform Resource Locator authorization modules
|
||||||
|
|
||||||
;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
|
;; Copyright (C) 1996, 1997, 1998, 1999, 2004, 2005, 2006, 2007,
|
||||||
;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
;; 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Keywords: comm, data, processes, hypermedia
|
;; Keywords: comm, data, processes, hypermedia
|
||||||
|
|
||||||
@ -25,9 +25,7 @@
|
|||||||
(require 'url-vars)
|
(require 'url-vars)
|
||||||
(require 'url-parse)
|
(require 'url-parse)
|
||||||
(autoload 'url-warn "url")
|
(autoload 'url-warn "url")
|
||||||
|
(autoload 'auth-source-user-or-password "auth-source")
|
||||||
(eval-and-compile
|
|
||||||
(autoload 'auth-source-user-or-password "auth-source"))
|
|
||||||
|
|
||||||
(defsubst url-auth-user-prompt (url realm)
|
(defsubst url-auth-user-prompt (url realm)
|
||||||
"String to usefully prompt for a username."
|
"String to usefully prompt for a username."
|
||||||
@ -83,11 +81,11 @@ instead of the filename inheritance method."
|
|||||||
(symbol-value url-basic-auth-storage))))
|
(symbol-value url-basic-auth-storage))))
|
||||||
(cond
|
(cond
|
||||||
((and prompt (not byserv))
|
((and prompt (not byserv))
|
||||||
(setq user (or
|
(setq user (or
|
||||||
(auth-source-user-or-password "login" server type)
|
(auth-source-user-or-password "login" server type)
|
||||||
(read-string (url-auth-user-prompt url realm)
|
(read-string (url-auth-user-prompt url realm)
|
||||||
(or user (user-real-login-name))))
|
(or user (user-real-login-name))))
|
||||||
pass (or
|
pass (or
|
||||||
(auth-source-user-or-password "password" server type)
|
(auth-source-user-or-password "password" server type)
|
||||||
(read-passwd "Password: " nil (or pass ""))))
|
(read-passwd "Password: " nil (or pass ""))))
|
||||||
(set url-basic-auth-storage
|
(set url-basic-auth-storage
|
||||||
@ -111,11 +109,11 @@ instead of the filename inheritance method."
|
|||||||
(setq byserv (cdr byserv))))
|
(setq byserv (cdr byserv))))
|
||||||
(if (or (and (not retval) prompt) overwrite)
|
(if (or (and (not retval) prompt) overwrite)
|
||||||
(progn
|
(progn
|
||||||
(setq user (or
|
(setq user (or
|
||||||
(auth-source-user-or-password "login" server type)
|
(auth-source-user-or-password "login" server type)
|
||||||
(read-string (url-auth-user-prompt url realm)
|
(read-string (url-auth-user-prompt url realm)
|
||||||
(user-real-login-name)))
|
(user-real-login-name)))
|
||||||
pass (or
|
pass (or
|
||||||
(auth-source-user-or-password "password" server type)
|
(auth-source-user-or-password "password" server type)
|
||||||
(read-passwd "Password: "))
|
(read-passwd "Password: "))
|
||||||
retval (base64-encode-string (format "%s:%s" user pass))
|
retval (base64-encode-string (format "%s:%s" user pass))
|
||||||
@ -205,11 +203,11 @@ instead of hostname:portnum."
|
|||||||
(setq byserv (cdr byserv))))
|
(setq byserv (cdr byserv))))
|
||||||
(if overwrite
|
(if overwrite
|
||||||
(if (and (not retval) prompt)
|
(if (and (not retval) prompt)
|
||||||
(setq user (or
|
(setq user (or
|
||||||
(auth-source-user-or-password "login" server type)
|
(auth-source-user-or-password "login" server type)
|
||||||
(read-string (url-auth-user-prompt url realm)
|
(read-string (url-auth-user-prompt url realm)
|
||||||
(user-real-login-name)))
|
(user-real-login-name)))
|
||||||
pass (or
|
pass (or
|
||||||
(auth-source-user-or-password "password" server type)
|
(auth-source-user-or-password "password" server type)
|
||||||
(read-passwd "Password: "))
|
(read-passwd "Password: "))
|
||||||
retval (setq retval
|
retval (setq retval
|
||||||
|
Loading…
Reference in New Issue
Block a user