From: yamaoka Date: Mon, 16 Nov 1998 12:18:52 +0000 (+0000) Subject: * nnmail.el (nnmail-read-passwd): Use `read-passwd' if it exists as a functon. X-Git-Tag: pgnus-ichikawa-199811302358~45 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f5b5271df83cfcec8df79df1ba0b66fde68b2518;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 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)