summaryrefslogtreecommitdiff
path: root/lisp/telnet.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-07 13:17:48 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-07 13:17:48 +0000
commit9f3d395ed401b133eef4debb9f1872849887c091 (patch)
tree700f1a48ecc7fe84e584881a281e03149c4b7e31 /lisp/telnet.el
parent9f03a9f84677712b94c9006d36820cdb5e0257b6 (diff)
downloademacs-9f3d395ed401b133eef4debb9f1872849887c091.tar.gz
(telnet): Don't make assumptions about process name.
(telnet-send-process-next-char): Renamed from send-...
Diffstat (limited to 'lisp/telnet.el')
-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."
(interactive "sOpen telnet connection to host: ")
(let* ((comint-delimiter-argument-list '(?\ ?\t))
(name (concat "telnet-" (comint-arguments host 0 nil) ))
- (buffer (get-buffer (concat "*" name "*"))))
+ (buffer (get-buffer (concat "*" name "*")))
+ process)
(if (and buffer (get-buffer-process buffer))
(switch-to-buffer (concat "*" name "*"))
(switch-to-buffer (make-comint name telnet-program))
- (set-process-filter (get-process name) 'telnet-initial-filter)
+ (setq process (get-buffer-process (current-buffer)))
+ (set-process-filter process 'telnet-initial-filter)
;; Don't send the `open' cmd till telnet is ready for it.
- (accept-process-output (get-process name))
+ (accept-process-output process)
(erase-buffer)
- (send-string name (concat "open " host "\n"))
+ (send-string process (concat "open " host "\n"))
(telnet-mode)
(setq comint-input-sender 'telnet-simple-send)
(setq telnet-count telnet-initial-count))))