X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/220d91b834f7f7252b9953460422151b86b3520c..894e21df1e1a38244ad0c8179adf4b632b25a592:/lisp/net/telnet.el diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index 25bf7db761..95c32a5b4f 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -1,10 +1,10 @@ ;;; 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-2016 Free Software +;; Foundation, Inc. ;; Author: William F. Schelter -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: unix, comm ;; This file is part of GNU Emacs. @@ -190,8 +190,6 @@ rejecting one login and prompting again for a username and password.") (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). @@ -219,8 +217,8 @@ Normally input is edited in Emacs and sent a line at a time." (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) @@ -239,15 +237,13 @@ Normally input is edited in Emacs and sent a line at a time." (define-derived-mode telnet-mode comint-mode "Telnet" "This mode is for using telnet (or rsh) from a buffer to another host. It has most of the same commands as comint-mode. -There is a variable ``telnet-interrupt-string'' which is the character +There is a variable `telnet-interrupt-string' which is the character sent to try to stop execution of a job on the remote host. Data is sent to the remote host when RET is typed." (set (make-local-variable 'window-point-insertion-type) t) (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). @@ -256,12 +252,11 @@ Normally input is edited in Emacs and sent a line at a time." (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