changeset 10129:c2fa03370e73

(telnet): Don't make assumptions about process name. (telnet-send-process-next-char): Renamed from send-...
author Richard M. Stallman <rms@gnu.org>
date Wed, 07 Dec 1994 13:17:48 +0000
parents 59ccd063e016
children 2fb93cbc2d87
files lisp/telnet.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/telnet.el	Wed Dec 07 13:03:48 1994 +0000
+++ b/lisp/telnet.el	Wed Dec 07 13:17:48 1994 +0000
@@ -187,15 +187,17 @@
   (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))))