aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/rlogin.el
diff options
context:
space:
mode:
authorNoah Friedman <[email protected]>1995-04-07 22:17:06 +0000
committerNoah Friedman <[email protected]>1995-04-07 22:17:06 +0000
commite1f06ce8069f9a3b35462c75b7c3c348827b216f (patch)
treec6d1ef336f65ef6190b0ae9ac1d0b4fd8d6e23b4 /lisp/rlogin.el
parent0ce653623d122de9a70f3e852740f877eda0337f (diff)
(rlogin): Use format, not concat, to generate numeric buffer names.
Do not create a new buffer if process in existing buffer has exited.
Diffstat (limited to 'lisp/rlogin.el')
-rw-r--r--lisp/rlogin.el26
1 files changed, 9 insertions, 17 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el
index a37175cd81..c53a1abd4c 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.24 1995/02/28 09:51:49 friedman Exp rms $
+;; $Id: rlogin.el,v 1.25 1995/03/12 18:18:29 rms Exp friedman $
;;; Commentary:
@@ -150,24 +150,16 @@ variable."
(format "*rlogin-%s@%s*" user host)))
proc)
+ (cond ((null prefix))
+ ((numberp prefix)
+ (setq buffer-name (format "%s<%d>" buffer-name prefix)))
+ (t
+ (setq buffer-name (generate-new-buffer-name buffer-name))))
+
+ (pop-to-buffer buffer-name)
(cond
- ((and (null prefix)
- (comint-check-proc buffer-name))
- (pop-to-buffer buffer-name))
- ;; This next case is done all in the predicate (including side effects
- ;; like pop-to-buffer) to avoid extra string consing via multiple
- ;; concats.
- ((and (numberp prefix)
- (let ((bufname (concat buffer-name "<" prefix ">")))
- (and (comint-check-proc bufname)
- (pop-to-buffer bufname)))))
+ ((comint-check-proc buffer-name))
(t
- (cond
- ((numberp prefix)
- (setq buffer-name (concat buffer-name "<" prefix ">")))
- (t
- (setq buffer-name (generate-new-buffer-name buffer-name))))
- (pop-to-buffer buffer-name)
(comint-exec (current-buffer) buffer-name rlogin-program nil args)
(setq proc (get-process buffer-name))
;; Set process-mark to point-max in case there is text in the