changeset 23464:7fb0a3c74e1d

(ange-ftp-read-passwd): Function deleted. (ange-ftp-set-passwd): Use read-passwd, not ange-ftp-read-passwd. (ange-ftp-get-passwd, ange-ftp-set-account): Likewise.
author Dave Love <fx@gnu.org>
date Wed, 14 Oct 1998 18:18:52 +0000
parents ac51d834b81e
children be6981601edf
files lisp/ange-ftp.el
diffstat 1 files changed, 5 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Wed Oct 14 18:09:05 1998 +0000
+++ b/lisp/ange-ftp.el	Wed Oct 14 18:18:52 1998 +0000
@@ -1128,29 +1128,6 @@
 ;;;; Password support.
 ;;;; ------------------------------------------------------------
 
-(defun ange-ftp-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 nil)
-	(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 "")
-    (ange-ftp-repaint-minibuffer)
-    (or pass default "")))
-
 (defmacro ange-ftp-generate-passwd-key (host user)
   (` (concat (downcase (, host)) "/" (, user))))
 
@@ -1162,7 +1139,7 @@
   "For a given HOST and USER, set or change the associated PASSWORD."
   (interactive (list (read-string "Host: ")
 		     (read-string "User: ")
-		     (ange-ftp-read-passwd "Password: ")))
+		     (read-passwd "Password: ")))
   (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user)
 			   passwd
 			   ange-ftp-passwd-hashtable))
@@ -1225,13 +1202,14 @@
 			    
 			    ;; found another machine with the same user.
 			    ;; Try that account.
-			    (ange-ftp-read-passwd
+			    (read-passwd
 			     (format "passwd for %s@%s (default same as %s@%s): "
 				     user host user other)
+			     nil
 			     (ange-ftp-lookup-passwd other user))
 			  
 			  ;; I give up.  Ask the user for the password.
-			  (ange-ftp-read-passwd
+			  (read-passwd
 			   (format "Password for %s@%s: " user host)))))
 	   (ange-ftp-set-passwd host user passwd)
 	   passwd))))
@@ -1249,7 +1227,7 @@
   "For a given HOST and USER, set or change the associated ACCOUNT password."
   (interactive (list (read-string "Host: ")
 		     (read-string "User: ")
-		     (ange-ftp-read-passwd "Account password: ")))
+		     (read-passwd "Account password: ")))
   (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user)
 			   account
 			   ange-ftp-account-hashtable))