summaryrefslogtreecommitdiff
path: root/lisp/rlogin.el
diff options
context:
space:
mode:
authorNoah Friedman <friedman@splode.com>1995-10-27 22:34:50 +0000
committerNoah Friedman <friedman@splode.com>1995-10-27 22:34:50 +0000
commitdc0d215ff6b0d832047cbf38b78ae2055c5857c7 (patch)
tree38ccb79d10e50dbf882ed5f585bd1e5ad4e32f70 /lisp/rlogin.el
parentd696adec3e8e60b775cf1a0f6730722f5570d1bd (diff)
downloademacs-dc0d215ff6b0d832047cbf38b78ae2055c5857c7.tar.gz
(rlogin): If `buffer' arg is a buffer object, initialize buffer-name to the
buffer name. Set `buffer' to buffer actually created or returned by get-buffer-create. Set `proc' to the process actually in the new buffer, not the process with the name buffer-name; they may not be the same if buffers have bee renamed.
Diffstat (limited to 'lisp/rlogin.el')
-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 @@
;; along with this program; if not, write to: The Free Software Foundation,
;; Inc.; 675 Massachusetts Avenue.; Cambridge, MA 02139, USA.
-;; $Id: rlogin.el,v 1.28 1995/05/12 17:51:12 roland Exp roland $
+;; $Id: rlogin.el,v 1.29 1995/06/08 13:03:15 roland Exp friedman $
;;; Commentary:
@@ -114,7 +114,7 @@ Communication with the remote host is recorded in a buffer `*rlogin-HOST*'
If a prefix argument is given and the buffer `*rlogin-HOST*' already exists,
a new buffer with a different connection will be made.
-When called from a program, if the optional second argument is a string or
+When called from a program, if the optional second argument is a string or
buffer, it names the buffer to use.
The variable `rlogin-program' contains the name of the actual program to
@@ -157,19 +157,23 @@ variable."
proc)
(cond ((null buffer))
- ((or (stringp buffer) (bufferp buffer))
+ ((stringp buffer)
(setq buffer-name buffer))
+ ((bufferp buffer)
+ (setq buffer-name (buffer-name buffer)))
((numberp buffer)
(setq buffer-name (format "%s<%d>" buffer-name buffer)))
(t
(setq buffer-name (generate-new-buffer-name buffer-name))))
+ (setq buffer (get-buffer-create buffer-name))
(pop-to-buffer buffer-name)
+
(cond
((comint-check-proc buffer-name))
(t
- (comint-exec (current-buffer) buffer-name rlogin-program nil args)
- (setq proc (get-process buffer-name))
+ (comint-exec buffer buffer-name rlogin-program nil args)
+ (setq proc (get-buffer-process buffer))
;; Set process-mark to point-max in case there is text in the
;; buffer from a previous exited process.
(set-marker (process-mark proc) (point-max))