aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/rlogin.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el
index c9dd71bd2a0..1eb548722e7 100644
--- a/lisp/rlogin.el
+++ b/lisp/rlogin.el
@@ -20,7 +20,7 @@
20;; along with this program; if not, write to: The Free Software Foundation, 20;; along with this program; if not, write to: The Free Software Foundation,
21;; Inc.; 675 Massachusetts Avenue.; Cambridge, MA 02139, USA. 21;; Inc.; 675 Massachusetts Avenue.; Cambridge, MA 02139, USA.
22 22
23;; $Id: rlogin.el,v 1.28 1995/05/12 17:51:12 roland Exp roland $ 23;; $Id: rlogin.el,v 1.29 1995/06/08 13:03:15 roland Exp friedman $
24 24
25;;; Commentary: 25;;; Commentary:
26 26
@@ -114,7 +114,7 @@ Communication with the remote host is recorded in a buffer `*rlogin-HOST*'
114If a prefix argument is given and the buffer `*rlogin-HOST*' already exists, 114If a prefix argument is given and the buffer `*rlogin-HOST*' already exists,
115a new buffer with a different connection will be made. 115a new buffer with a different connection will be made.
116 116
117When called from a program, if the optional second argument is a string or 117When called from a program, if the optional second argument is a string or
118buffer, it names the buffer to use. 118buffer, it names the buffer to use.
119 119
120The variable `rlogin-program' contains the name of the actual program to 120The variable `rlogin-program' contains the name of the actual program to
@@ -157,19 +157,23 @@ variable."
157 proc) 157 proc)
158 158
159 (cond ((null buffer)) 159 (cond ((null buffer))
160 ((or (stringp buffer) (bufferp buffer)) 160 ((stringp buffer)
161 (setq buffer-name buffer)) 161 (setq buffer-name buffer))
162 ((bufferp buffer)
163 (setq buffer-name (buffer-name buffer)))
162 ((numberp buffer) 164 ((numberp buffer)
163 (setq buffer-name (format "%s<%d>" buffer-name buffer))) 165 (setq buffer-name (format "%s<%d>" buffer-name buffer)))
164 (t 166 (t
165 (setq buffer-name (generate-new-buffer-name buffer-name)))) 167 (setq buffer-name (generate-new-buffer-name buffer-name))))
166 168
169 (setq buffer (get-buffer-create buffer-name))
167 (pop-to-buffer buffer-name) 170 (pop-to-buffer buffer-name)
171
168 (cond 172 (cond
169 ((comint-check-proc buffer-name)) 173 ((comint-check-proc buffer-name))
170 (t 174 (t
171 (comint-exec (current-buffer) buffer-name rlogin-program nil args) 175 (comint-exec buffer buffer-name rlogin-program nil args)
172 (setq proc (get-process buffer-name)) 176 (setq proc (get-buffer-process buffer))
173 ;; Set process-mark to point-max in case there is text in the 177 ;; Set process-mark to point-max in case there is text in the
174 ;; buffer from a previous exited process. 178 ;; buffer from a previous exited process.
175 (set-marker (process-mark proc) (point-max)) 179 (set-marker (process-mark proc) (point-max))