aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-07 13:17:48 +0000
committerRichard M. Stallman1994-12-07 13:17:48 +0000
commitf0ed29b2f0b009ba0b0f26572810056aa9f8a09f (patch)
tree104f69815d10d74b33bff6294c461e8f64ce62f5
parent75ebf74b48275db79b7d1fdb040b13bf0f6f1253 (diff)
downloademacs-f0ed29b2f0b009ba0b0f26572810056aa9f8a09f.tar.gz
emacs-f0ed29b2f0b009ba0b0f26572810056aa9f8a09f.zip
(telnet): Don't make assumptions about process name.
(telnet-send-process-next-char): Renamed from send-...
-rw-r--r--lisp/telnet.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/telnet.el b/lisp/telnet.el
index 13a5e391a4a..27de4ffbb24 100644
--- a/lisp/telnet.el
+++ b/lisp/telnet.el
@@ -187,15 +187,17 @@ Normally input is edited in Emacs and sent a line at a time."
187 (interactive "sOpen telnet connection to host: ") 187 (interactive "sOpen telnet connection to host: ")
188 (let* ((comint-delimiter-argument-list '(?\ ?\t)) 188 (let* ((comint-delimiter-argument-list '(?\ ?\t))
189 (name (concat "telnet-" (comint-arguments host 0 nil) )) 189 (name (concat "telnet-" (comint-arguments host 0 nil) ))
190 (buffer (get-buffer (concat "*" name "*")))) 190 (buffer (get-buffer (concat "*" name "*")))
191 process)
191 (if (and buffer (get-buffer-process buffer)) 192 (if (and buffer (get-buffer-process buffer))
192 (switch-to-buffer (concat "*" name "*")) 193 (switch-to-buffer (concat "*" name "*"))
193 (switch-to-buffer (make-comint name telnet-program)) 194 (switch-to-buffer (make-comint name telnet-program))
194 (set-process-filter (get-process name) 'telnet-initial-filter) 195 (setq process (get-buffer-process (current-buffer)))
196 (set-process-filter process 'telnet-initial-filter)
195 ;; Don't send the `open' cmd till telnet is ready for it. 197 ;; Don't send the `open' cmd till telnet is ready for it.
196 (accept-process-output (get-process name)) 198 (accept-process-output process)
197 (erase-buffer) 199 (erase-buffer)
198 (send-string name (concat "open " host "\n")) 200 (send-string process (concat "open " host "\n"))
199 (telnet-mode) 201 (telnet-mode)
200 (setq comint-input-sender 'telnet-simple-send) 202 (setq comint-input-sender 'telnet-simple-send)
201 (setq telnet-count telnet-initial-count)))) 203 (setq telnet-count telnet-initial-count))))