aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/telnet.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/telnet.el b/lisp/telnet.el
index d115f3e4326..fec7f9c976e 100644
--- a/lisp/telnet.el
+++ b/lisp/telnet.el
@@ -132,6 +132,12 @@ rejecting one login and prompting for the again for a username and password.")
132 (set-process-filter proc 'telnet-filter)) 132 (set-process-filter proc 'telnet-filter))
133 (t (setq telnet-count (1+ telnet-count))))))) 133 (t (setq telnet-count (1+ telnet-count)))))))
134 134
135;; Identical to comint-simple-send, except that it sends telnet-new-line
136;; instead of "\n".
137(defun telnet-simple-send (proc string)
138 (comint-send-string proc string)
139 (comint-send-string proc telnet-new-line))
140
135(defun telnet-filter (proc string) 141(defun telnet-filter (proc string)
136 (let ((at-end 142 (let ((at-end
137 (and (eq (process-buffer proc) (current-buffer)) 143 (and (eq (process-buffer proc) (current-buffer))
@@ -178,6 +184,7 @@ Normally input is edited in Emacs and sent a line at a time."
178 (erase-buffer) 184 (erase-buffer)
179 (send-string name (concat "open " arg "\n")) 185 (send-string name (concat "open " arg "\n"))
180 (telnet-mode) 186 (telnet-mode)
187 (setq comint-input-sender 'telnet-simple-send)
181 (setq telnet-count telnet-initial-count))) 188 (setq telnet-count telnet-initial-count)))
182 189
183(defun telnet-mode () 190(defun telnet-mode ()