changeset 6738:91a5e1cd14c7

(telnet-initial-filter, read-password): Don't unnecessarily duplicate comint functionality.
author Karl Heuer <kwzh@gnu.org>
date Fri, 08 Apr 1994 00:18:37 +0000
parents a3ef1108b7ff
children 6b0dd4aeca67
files lisp/telnet.el
diffstat 1 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/telnet.el	Thu Apr 07 20:31:17 1994 +0000
+++ b/lisp/telnet.el	Fri Apr 08 00:18:37 1994 +0000
@@ -127,10 +127,9 @@
 	 (error "No such host."))
 	((string-match "passw" string)
 	 (telnet-filter proc string)
-	 (let* ((echo-keystrokes 0)
-		(password (read-password)))
-	   (setq telnet-count 0)
-	   (send-string proc (concat password telnet-new-line))))
+	 (setq telnet-count 0)
+	 (send-string proc (concat (comint-read-noecho "Password: " t)
+				   telnet-new-line)))
 	(t (telnet-check-software-type-initialize string)
 	   (telnet-filter proc string)
 	   (cond ((> telnet-count telnet-maximum-count)
@@ -228,14 +227,6 @@
     (telnet-mode)
     (setq telnet-count -16)))
 
-(defun read-password ()
-  (let ((answ "") tem)
-    (message "Reading password...")
-    (while (prog1 (not (memq (setq tem (read-char)) '(?\C-m ?\n ?\C-g)))
-	     (setq quit-flag nil))
-      (setq answ (concat answ (char-to-string tem))))
-    answ))
-
 (provide 'telnet)
 
 ;;; telnet.el ends here