changeset 25571:86658a5ab908

(rmail-read-password): Deleted. (rmail-get-pop-password): Use read-password.
author Dave Love <fx@gnu.org>
date Mon, 06 Sep 1999 21:24:50 +0000
parents 564aae4ff7f0
children ab9550c61b8a
files lisp/mail/rmail.el
diffstat 1 files changed, 1 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Mon Sep 06 21:20:57 1999 +0000
+++ b/lisp/mail/rmail.el	Mon Sep 06 21:24:50 1999 +0000
@@ -1453,29 +1453,6 @@
       (setq files (cdr files)))
     delete-files))
 
-(defun rmail-read-passwd (prompt &optional default)
-  "Read a password, echoing `.' for each character typed.
-End with RET, LFD, or ESC.  DEL or C-h rubs out.  C-u kills line.
-Optional DEFAULT is password to start with."
-  (let ((pass (if default default ""))
-	(c 0)
-	(echo-keystrokes 0)
-	(cursor-in-echo-area t))
-    (while (progn (message "%s%s"
-			   prompt
-			   (make-string (length pass) ?.))
-		  (setq c (read-char))
-		  (and (/= c ?\r) (/= c ?\n) (/= c ?\e)))
-      (if (= c ?\C-u)
-	  (setq pass "")
-	(if (and (/= c ?\b) (/= c ?\177))
-	    (setq pass (concat pass (char-to-string c)))
-	  (if (> (length pass) 0)
-	      (setq pass (substring pass 0 -1))))))
-    (message "")
-    (message nil)
-    pass))
-
 ;; Decode the region specified by FROM and TO by CODING.
 ;; If CODING is nil or an invalid coding system, decode by `undecided'.
 (defun rmail-decode-region (from to coding)
@@ -3369,7 +3346,7 @@
 has been set, then prompt the user for one."
   (if (not rmail-encoded-pop-password)
       (progn (if (not rmail-pop-password)
-		 (setq rmail-pop-password (rmail-read-passwd "POP password: ")))
+		 (setq rmail-pop-password (read-passwd "POP password: ")))
 	     (rmail-set-pop-password rmail-pop-password)
 	     (setq rmail-pop-password nil)))
   (rmail-encode-string rmail-encoded-pop-password (emacs-pid)))