Mercurial > emacs
comparison lisp/rlogin.el @ 5792:242985a124fc
Removed many extra autoload cookies.
(rlogin-send-Ctrl-D): New function, on C-c C-d.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Sat, 05 Feb 1994 21:00:13 +0000 |
parents | 203a78f3f2e4 |
children | 85abf27f701f |
comparison
equal
deleted
inserted
replaced
5791:12fc8c6d4315 | 5792:242985a124fc |
---|---|
2 | 2 |
3 ;; Author: Noah Friedman | 3 ;; Author: Noah Friedman |
4 ;; Maintainer: Noah Friedman <friedman@prep.ai.mit.edu> | 4 ;; Maintainer: Noah Friedman <friedman@prep.ai.mit.edu> |
5 ;; Keywords: unix, comm | 5 ;; Keywords: unix, comm |
6 | 6 |
7 ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. | 7 ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. |
8 ;; | 8 ;; |
9 ;; This program is free software; you can redistribute it and/or modify | 9 ;; This program is free software; you can redistribute it and/or modify |
10 ;; it under the terms of the GNU General Public License as published by | 10 ;; it under the terms of the GNU General Public License as published by |
11 ;; the Free Software Foundation; either version 2, or (at your option) | 11 ;; the Free Software Foundation; either version 2, or (at your option) |
12 ;; any later version. | 12 ;; any later version. |
21 ;; Inc.; 675 Massachusetts Avenue.; Cambridge, MA 02139, USA. | 21 ;; Inc.; 675 Massachusetts Avenue.; Cambridge, MA 02139, USA. |
22 | 22 |
23 ;;; Commentary: | 23 ;;; Commentary: |
24 | 24 |
25 ;; Support for remote logins using `rlogin'. | 25 ;; Support for remote logins using `rlogin'. |
26 ;; $Id: rlogin.el,v 1.14 1993/12/01 09:57:04 friedman Exp friedman $ | 26 ;; $Id: rlogin.el,v 1.15 1993/12/01 13:04:24 friedman Exp roland $ |
27 | 27 |
28 ;;; Todo: | 28 ;;; Todo: |
29 | 29 |
30 ;; Make this mode deal with comint-last-input-end properly. | 30 ;; Make this mode deal with comint-last-input-end properly. |
31 | 31 |
68 "*If non-`nil', query user for a password in the minibuffer when a Password: prompt appears. | 68 "*If non-`nil', query user for a password in the minibuffer when a Password: prompt appears. |
69 It's also possible to selectively enter passwords without echoing them in | 69 It's also possible to selectively enter passwords without echoing them in |
70 the minibuffer using the command `rlogin-password' explicitly.") | 70 the minibuffer using the command `rlogin-password' explicitly.") |
71 | 71 |
72 ;; Initialize rlogin mode map. | 72 ;; Initialize rlogin mode map. |
73 ;;;###autoload | |
74 (defvar rlogin-mode-map '()) | 73 (defvar rlogin-mode-map '()) |
75 (cond ((not rlogin-mode-map) | 74 (cond ((not rlogin-mode-map) |
76 (setq rlogin-mode-map (cons 'keymap shell-mode-map)) | 75 (setq rlogin-mode-map (cons 'keymap shell-mode-map)) |
77 (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C) | 76 (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C) |
77 (define-key rlogin-mode-map "\C-c\C-d" 'rlogin-send-Ctrl-D) | |
78 (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z) | 78 (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z) |
79 (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash) | 79 (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash) |
80 (define-key rlogin-mode-map "\C-d" 'rlogin-delchar-or-send-Ctrl-D))) | 80 (define-key rlogin-mode-map "\C-d" 'rlogin-delchar-or-send-Ctrl-D))) |
81 | 81 |
82 ;;;###autoload | 82 ;;;###autoload |
130 (and rlogin-initially-track-cwd | 130 (and rlogin-initially-track-cwd |
131 ;; Presume the user will start in his remote home directory. | 131 ;; Presume the user will start in his remote home directory. |
132 ;; If this is wrong, M-x dirs will fix it. | 132 ;; If this is wrong, M-x dirs will fix it. |
133 (cd-absolute (concat "/" (car args) ":~/"))))))) | 133 (cd-absolute (concat "/" (car args) ":~/"))))))) |
134 | 134 |
135 ;;;###autoload | |
136 (defun rlogin-password (&optional proc) | 135 (defun rlogin-password (&optional proc) |
137 "Read a password and send it to an rlogin session. | 136 "Read a password and send it to an rlogin session. |
138 For each character typed, a `*' is echoed in the minibuffer. | 137 For each character typed, a `*' is echoed in the minibuffer. |
139 End with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. | 138 End with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. |
140 C-g aborts attempt to read and send password. | 139 C-g aborts attempt to read and send password. |
152 (save-excursion | 151 (save-excursion |
153 (set-buffer buffer-name) | 152 (set-buffer buffer-name) |
154 (insert-before-markers "\n") | 153 (insert-before-markers "\n") |
155 (comint-send-string proc (format "%s\n" pass)))))) | 154 (comint-send-string proc (format "%s\n" pass)))))) |
156 | 155 |
157 ;;;###autoload | |
158 (defun rlogin-mode () | 156 (defun rlogin-mode () |
159 "Set major-mode for rlogin sessions. | 157 "Set major-mode for rlogin sessions. |
160 If `rlogin-mode-hook' is set, run it." | 158 If `rlogin-mode-hook' is set, run it." |
161 (interactive) | 159 (interactive) |
162 (kill-all-local-variables) | 160 (kill-all-local-variables) |
192 (set-window-start window region-begin 'noforce))) | 190 (set-window-start window region-begin 'noforce))) |
193 (and rlogin-password-paranoia | 191 (and rlogin-password-paranoia |
194 (string= "Password:" string) | 192 (string= "Password:" string) |
195 (rlogin-password proc))) | 193 (rlogin-password proc))) |
196 | 194 |
197 ;;;###autoload | |
198 (defun rlogin-send-Ctrl-C () | 195 (defun rlogin-send-Ctrl-C () |
199 (interactive) | 196 (interactive) |
200 (send-string nil "\C-c")) | 197 (send-string nil "\C-c")) |
201 | 198 |
202 ;;;###autoload | 199 (defun rlogin-send-Ctrl-D () |
200 (interactive) | |
201 (send-string nil "\C-d")) | |
202 | |
203 (defun rlogin-send-Ctrl-Z () | 203 (defun rlogin-send-Ctrl-Z () |
204 (interactive) | 204 (interactive) |
205 (send-string nil "\C-z")) | 205 (send-string nil "\C-z")) |
206 | 206 |
207 ;;;###autoload | |
208 (defun rlogin-send-Ctrl-backslash () | 207 (defun rlogin-send-Ctrl-backslash () |
209 (interactive) | 208 (interactive) |
210 (send-string nil "\C-\\")) | 209 (send-string nil "\C-\\")) |
211 | 210 |
212 ;;;###autoload | |
213 (defun rlogin-delchar-or-send-Ctrl-D (arg) | 211 (defun rlogin-delchar-or-send-Ctrl-D (arg) |
214 "Delete ARG characters forward, or send a C-d to process if at end of | 212 "Delete ARG characters forward, or send a C-d to process if at end of |
215 buffer." | 213 buffer." |
216 (interactive "p") | 214 (interactive "p") |
217 (if (eobp) | 215 (if (eobp) |