From: yamaoka Date: Mon, 16 Nov 1998 12:17:34 +0000 (+0000) Subject: * nnmail.el (nnmail-read-passwd): Use `read-passwd' if it exists as a functon. X-Git-Tag: gnus-6_8-199811302358~26 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2b6852443a772023c7c189dcf499c453102b9efe;p=elisp%2Fgnus.git- * nnmail.el (nnmail-read-passwd): Use `read-passwd' if it exists as a functon. * pop3.el (nnmail-read-passwd): Likewise. ;; Commit by Kenji Itoh by way of yamaoka. --- diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 16541b1..d40faae 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1685,11 +1685,13 @@ If ARGS, PROMPT is used as an argument to `format'." (apply 'format prompt args) prompt))) (unless nnmail-read-passwd - (if (load "passwd" t) + (if (functionp 'read-passwd) (setq nnmail-read-passwd 'read-passwd) - (unless (fboundp 'ange-ftp-read-passwd) - (autoload 'ange-ftp-read-passwd "ange-ftp")) - (setq nnmail-read-passwd 'ange-ftp-read-passwd))) + (if (load "passwd" t) + (setq nnmail-read-passwd 'read-passwd) + (unless (fboundp 'ange-ftp-read-passwd) + (autoload 'ange-ftp-read-passwd "ange-ftp")) + (setq nnmail-read-passwd 'ange-ftp-read-passwd)))) (funcall nnmail-read-passwd prompt))) (defun nnmail-check-syntax () diff --git a/lisp/pop3.el b/lisp/pop3.el index 1bfd8ec..b03138c 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -192,10 +192,12 @@ Return the response string if optional second argument is non-nil." (defvar pop3-read-passwd nil) (defun pop3-read-passwd (prompt) (if (not pop3-read-passwd) - (if (load "passwd" t) + (if (functionp 'read-passwd) (setq pop3-read-passwd 'read-passwd) - (autoload 'ange-ftp-read-passwd "ange-ftp") - (setq pop3-read-passwd 'ange-ftp-read-passwd))) + (if (load "passwd" t) + (setq pop3-read-passwd 'read-passwd) + (autoload 'ange-ftp-read-passwd "ange-ftp") + (setq pop3-read-passwd 'ange-ftp-read-passwd)))) (funcall pop3-read-passwd prompt)) (defun pop3-clean-region (start end)