aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond1993-04-23 02:20:59 +0000
committerEric S. Raymond1993-04-23 02:20:59 +0000
commitb501435020ddd3d928a85162167c8b088b7ea450 (patch)
treed581f927099eacc454cb74f5aac72f95b0b7579c
parent1143a6b0e2eaa1c5b73726b2c3dab4940b6d8616 (diff)
downloademacs-b501435020ddd3d928a85162167c8b088b7ea450.tar.gz
emacs-b501435020ddd3d928a85162167c8b088b7ea450.zip
Commentary added.
(telnet): Doc fix. (rsh): Added entry point for rsh to remote host, per suggestion by Michael McNamara <mac@ardent.com>. No change to any other code.
-rw-r--r--lisp/telnet.el41
1 files changed, 34 insertions, 7 deletions
diff --git a/lisp/telnet.el b/lisp/telnet.el
index 5fb439adc1e..d115f3e4326 100644
--- a/lisp/telnet.el
+++ b/lisp/telnet.el
@@ -21,11 +21,27 @@
21;; along with GNU Emacs; see the file COPYING. If not, write to 21;; along with GNU Emacs; see the file COPYING. If not, write to
22;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 23
24;;; Commentary:
25
26;; This mode is intended to be used for telnet or rsh to a remode host;
27;; `telnet' and `rsh' are the two entry points. Multiple telnet or rsh
28;; sessions are supported.
29;;
30;; Normally, input is sent to the remote telnet/rsh line-by-line, as you
31;; type RET or LFD. C-c C-c sends a C-c to the remote immediately;
32;; C-c C-z sends C-z immediately. C-c C-q followed by any character
33;; sends that character immediately.
34;;
35;; All RET characters are filtered out of the output coming back from the
36;; remote system. The mode tries to do other useful translations based
37;; on what it sees coming back from the other system before the password
38;; query. It knows about UNIX, ITS, TOPS-20 and Explorer systems.
39
24;;; Code: 40;;; Code:
25 41
26;;to do fix software types for lispm: 42;; to do fix software types for lispm:
27;;to eval current expression. Also to try to send escape keys correctly. 43;; to eval current expression. Also to try to send escape keys correctly.
28;;essentially we'll want the rubout-handler off. 44;; essentially we'll want the rubout-handler off.
29 45
30;; filter is simplistic but should be okay for typical shell usage. 46;; filter is simplistic but should be okay for typical shell usage.
31;; needs hacking if it is going to deal with asynchronous output in a sane 47;; needs hacking if it is going to deal with asynchronous output in a sane
@@ -165,16 +181,14 @@ Normally input is edited in Emacs and sent a line at a time."
165 (setq telnet-count telnet-initial-count))) 181 (setq telnet-count telnet-initial-count)))
166 182
167(defun telnet-mode () 183(defun telnet-mode ()
168 "This mode is for telnetting from a buffer to another host. 184 "This mode is for using telnet (or rsh) from a buffer to another host.
169It has most of the same commands as comint-mode. 185It has most of the same commands as comint-mode.
170There is a variable ``telnet-interrupt-string'' which is the character 186There is a variable ``telnet-interrupt-string'' which is the character
171sent to try to stop execution of a job on the remote host. 187sent to try to stop execution of a job on the remote host.
172Data is sent to the remote host when RET is typed. 188Data is sent to the remote host when RET is typed.
173 189
174\\{telnet-mode-map} 190\\{telnet-mode-map}
175 191"
176Bugs:
177--Replaces by a space, really should remove."
178 (interactive) 192 (interactive)
179 (comint-mode) 193 (comint-mode)
180 (setq major-mode 'telnet-mode 194 (setq major-mode 'telnet-mode
@@ -183,6 +197,19 @@ Bugs:
183 (use-local-map telnet-mode-map) 197 (use-local-map telnet-mode-map)
184 (run-hooks 'telnet-mode-hook)) 198 (run-hooks 'telnet-mode-hook))
185 199
200;;;###autoload
201(defun rsh (arg)
202 "Open a network login connection to host named HOST (a string).
203Communication with HOST is recorded in a buffer *HOST-rsh*.
204Normally input is edited in Emacs and sent a line at a time."
205 (interactive "sOpen rsh connection to host: ")
206 (require 'shell)
207 (let ((name (concat arg "-rsh" )))
208 (switch-to-buffer (make-comint name "rsh"))
209 (set-process-filter (get-process name) 'telnet-initial-filter)
210 (telnet-mode)
211 (setq telnet-count -16)))
212
186(defun read-password () 213(defun read-password ()
187 (let ((answ "") tem) 214 (let ((answ "") tem)
188 (message "Reading password...") 215 (message "Reading password...")