summaryrefslogtreecommitdiff
path: root/lisp/telnet.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-04-08 00:18:37 +0000
committerKarl Heuer <kwzh@gnu.org>1994-04-08 00:18:37 +0000
commitdf4ab15b2493df34460309ed8c8a078413a72e3b (patch)
treed42fcd732c40ace90136dd863646f056b0b17163 /lisp/telnet.el
parent9b52e8a02ba5faab37d09ee4f429f313cba6bb8d (diff)
downloademacs-df4ab15b2493df34460309ed8c8a078413a72e3b.tar.gz
(telnet-initial-filter, read-password): Don't unnecessarily duplicate comint
functionality.
Diffstat (limited to 'lisp/telnet.el')
-rw-r--r--lisp/telnet.el15
1 files changed, 3 insertions, 12 deletions
diff --git a/lisp/telnet.el b/lisp/telnet.el
index 6a4a1f3f285..19cac0f734e 100644
--- a/lisp/telnet.el
+++ b/lisp/telnet.el
@@ -127,10 +127,9 @@ rejecting one login and prompting again for a username and password.")
(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 @@ Normally input is edited in Emacs and sent a line at a time."
(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