# HG changeset patch # User Dave Love # Date 908389132 0 # Node ID 7fb0a3c74e1d45254abe1e1e385c8a4b5806e0cb # Parent ac51d834b81ef49722b198219c31e2e538d598f2 (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. diff -r ac51d834b81e -r 7fb0a3c74e1d lisp/ange-ftp.el --- 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))