Function: telnet-initial-filter
telnet-initial-filter is a byte-compiled function defined in
telnet.el.gz.
Signature
(telnet-initial-filter PROC STRING)
Source Code
;; Defined in /usr/src/emacs/lisp/net/telnet.el.gz
(defun telnet-initial-filter (proc string)
;For reading up to and including password; also will get machine type.
(save-current-buffer
(set-buffer (process-buffer proc))
(let ((case-fold-search t))
(cond ((string-match "No such host" string)
(kill-buffer (process-buffer proc))
(error "No such host"))
((string-match "passw" string)
(telnet-filter proc string)
(setq telnet-count 0)
(process-send-string proc (concat (read-passwd "Password: ")
telnet-new-line))
(clear-this-command-keys))
(t (telnet-check-software-type-initialize string)
(telnet-filter proc string)
(cond ((> telnet-count telnet-maximum-count)
(set-process-filter proc #'telnet-filter))
(t (setq telnet-count (1+ telnet-count)))))))))