From 2b6852443a772023c7c189dcf499c453102b9efe Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 16 Nov 1998 12:17:34 +0000 Subject: [PATCH] * 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. --- lisp/nnmail.el | 10 ++++++---- lisp/pop3.el | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) 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) -- 1.7.10.4