;;; telnet.el --- run a telnet session from within an Emacs buffer
-;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2012
+;; Free Software Foundation, Inc.
;; Author: William F. Schelter
;; Maintainer: FSF
(delete-region comint-last-input-start
comint-last-input-end)))
-;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)"))
-
;;;###autoload
(defun telnet (host &optional port)
"Open a network login connection to host named HOST (a string).
(telnet-options (if (cdr properties) (cons "-l" (cdr properties))))
process)
(if (and buffer (get-buffer-process buffer))
- (pop-to-buffer (concat "*" name "*"))
- (pop-to-buffer
+ (switch-to-buffer (concat "*" name "*"))
+ (switch-to-buffer
(apply 'make-comint name telnet-program nil telnet-options))
(setq process (get-buffer-process (current-buffer)))
(set-process-filter process 'telnet-initial-filter)
(set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern)
(set (make-local-variable 'comint-use-prompt-regexp) t))
-;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)"))
-
;;;###autoload
(defun rsh (host)
"Open a network login connection to host named HOST (a string).
(interactive "sOpen rsh connection to host: ")
(require 'shell)
(let ((name (concat "rsh-" host )))
- (pop-to-buffer (make-comint name remote-shell-program nil host))
+ (switch-to-buffer (make-comint name remote-shell-program nil host))
(set-process-filter (get-process name) 'telnet-initial-filter)
(telnet-mode)
(setq telnet-count -16)))
(provide 'telnet)
-;; arch-tag: 98218821-d04a-48b6-9058-57d0d4677a56
;;; telnet.el ends here