From f5b5271df83cfcec8df79df1ba0b66fde68b2518 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 16 Nov 1998 12:18:52 +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 c3617fa..75bc880 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1655,11 +1655,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 848bbef..f13f28d 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -194,10 +194,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