aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-04-08 00:18:37 +0000
committerKarl Heuer1994-04-08 00:18:37 +0000
commit25e907da8b54041d823bd0852536b9956e2fcfe2 (patch)
tree35d8fc731d6edb79e650ac37c23b2ae1e24cb145
parente555fdd878a0e0bc7f1f50a8fdeff248afffe77d (diff)
downloademacs-25e907da8b54041d823bd0852536b9956e2fcfe2.tar.gz
emacs-25e907da8b54041d823bd0852536b9956e2fcfe2.zip
(telnet-initial-filter, read-password): Don't unnecessarily duplicate comint
functionality.
-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.")
127 (error "No such host.")) 127 (error "No such host."))
128 ((string-match "passw" string) 128 ((string-match "passw" string)
129 (telnet-filter proc string) 129 (telnet-filter proc string)
130 (let* ((echo-keystrokes 0) 130 (setq telnet-count 0)
131 (password (read-password))) 131 (send-string proc (concat (comint-read-noecho "Password: " t)
132 (setq telnet-count 0) 132 telnet-new-line)))
133 (send-string proc (concat password telnet-new-line))))
134 (t (telnet-check-software-type-initialize string) 133 (t (telnet-check-software-type-initialize string)
135 (telnet-filter proc string) 134 (telnet-filter proc string)
136 (cond ((> telnet-count telnet-maximum-count) 135 (cond ((> telnet-count telnet-maximum-count)
@@ -228,14 +227,6 @@ Normally input is edited in Emacs and sent a line at a time."
228 (telnet-mode) 227 (telnet-mode)
229 (setq telnet-count -16))) 228 (setq telnet-count -16)))
230 229
231(defun read-password ()
232 (let ((answ "") tem)
233 (message "Reading password...")
234 (while (prog1 (not (memq (setq tem (read-char)) '(?\C-m ?\n ?\C-g)))
235 (setq quit-flag nil))
236 (setq answ (concat answ (char-to-string tem))))
237 answ))
238
239(provide 'telnet) 230(provide 'telnet)
240 231
241;;; telnet.el ends here 232;;; telnet.el ends here