summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-06-08 13:03:15 +0000
committerRoland McGrath <roland@gnu.org>1995-06-08 13:03:15 +0000
commit0ea3d0978fdd8bf16db52cddcd113e54092ce4f3 (patch)
tree3e5c0e32df5c996274c20f9fab4205bfb65ae76e /lisp
parent33466f201911d4d0fe394202afad6bb3b795272f (diff)
downloademacs-0ea3d0978fdd8bf16db52cddcd113e54092ce4f3.tar.gz
(rlogin): If optional second arg is buffer or string, use that as name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/rlogin.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el
index 30a3fcb3f43..c9dd71bd2a0 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.27 1995/04/07 22:27:24 friedman Exp roland $
+;; $Id: rlogin.el,v 1.28 1995/05/12 17:51:12 roland Exp roland $
;;; Commentary:
@@ -105,7 +105,7 @@ this variable is set from that.")
(defvar rlogin-history nil)
;;;###autoload
-(defun rlogin (input-args &optional prefix)
+(defun rlogin (input-args &optional buffer)
"Open a network login connection to HOST via the `rlogin' program.
Input is sent line-at-a-time to the remote connection.
@@ -114,6 +114,9 @@ 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
+buffer, it names the buffer to use.
+
The variable `rlogin-program' contains the name of the actual program to
run. It can be a relative or absolute path.
@@ -153,9 +156,11 @@ variable."
(format "*rlogin-%s@%s*" user host)))
proc)
- (cond ((null prefix))
- ((numberp prefix)
- (setq buffer-name (format "%s<%d>" buffer-name prefix)))
+ (cond ((null buffer))
+ ((or (stringp buffer) (bufferp buffer))
+ (setq buffer-name buffer))
+ ((numberp buffer)
+ (setq buffer-name (format "%s<%d>" buffer-name buffer)))
(t
(setq buffer-name (generate-new-buffer-name buffer-name))))