diff options
| author | Roland McGrath | 1993-09-08 07:09:00 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-09-08 07:09:00 +0000 |
| commit | 09567b5cb1dc77c7df6f6d4255d3dfac649b3b02 (patch) | |
| tree | 0bc6f2cb3fd22c1e13caa4454bfdec9e39d7bc63 | |
| parent | 9dac04334996ac7124c11871112fc8a33618d752 (diff) | |
| download | emacs-09567b5cb1dc77c7df6f6d4255d3dfac649b3b02.tar.gz emacs-09567b5cb1dc77c7df6f6d4255d3dfac649b3b02.zip | |
(rlogin): After rlogin-mode, set comint-filename-prefix locally to indicate
the host, and cd to /HOST:~/.
(rlogin-mode-map): Start with (cons 'keymap shell-mode-map), rather than
with a full copy of comint-mode-map.
| -rw-r--r-- | lisp/rlogin.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/rlogin.el b/lisp/rlogin.el index 1d9f077afef..ec330abd6ee 100644 --- a/lisp/rlogin.el +++ b/lisp/rlogin.el | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | ;;; Commentary: | 23 | ;;; Commentary: |
| 24 | 24 | ||
| 25 | ;; Support for remote logins using `rlogin'. | 25 | ;; Support for remote logins using `rlogin'. |
| 26 | ;; | ||
| 27 | ;; Todo: add directory tracking using ange-ftp style patchnames for the cwd. | ||
| 28 | 26 | ||
| 29 | ;;; Code: | 27 | ;;; Code: |
| 30 | 28 | ||
| @@ -63,9 +61,7 @@ the minibuffer using the command `rlogin-password' explicitly.") | |||
| 63 | ;;;###autoload | 61 | ;;;###autoload |
| 64 | (defvar rlogin-mode-map '()) | 62 | (defvar rlogin-mode-map '()) |
| 65 | (cond ((not rlogin-mode-map) | 63 | (cond ((not rlogin-mode-map) |
| 66 | (setq rlogin-mode-map (full-copy-sparse-keymap comint-mode-map)) | 64 | (setq rlogin-mode-map (cons 'keymap shell-mode-map)) |
| 67 | ;(define-key rlogin-mode-map "\M-\t" 'comint-dynamic-complete) | ||
| 68 | ;(define-key rlogin-mode-map "\M-?" 'comint-dynamic-list-completions) | ||
| 69 | (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C) | 65 | (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C) |
| 70 | (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z) | 66 | (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z) |
| 71 | (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash) | 67 | (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash) |
| @@ -105,7 +101,15 @@ the rlogin when starting." | |||
| 105 | ;; buffer from a previous exited process. | 101 | ;; buffer from a previous exited process. |
| 106 | (set-marker (process-mark proc) (point-max)) | 102 | (set-marker (process-mark proc) (point-max)) |
| 107 | (set-process-filter proc 'rlogin-filter) | 103 | (set-process-filter proc 'rlogin-filter) |
| 108 | (rlogin-mode))))) | 104 | (rlogin-mode) |
| 105 | ;; Set the prefix for filename completion and directory tracking | ||
| 106 | ;; to find the remote machine's files by ftp. | ||
| 107 | (set (make-local-variable 'comint-filename-prefix) | ||
| 108 | (concat "/" host ":")) | ||
| 109 | ;; Presume the user will start in his remote home directory. | ||
| 110 | ;; If this is wrong, M-x dirs will fix it. | ||
| 111 | (cd-absolute (concat "/" host ":~/")) | ||
| 112 | )))) | ||
| 109 | 113 | ||
| 110 | ;;;###autoload | 114 | ;;;###autoload |
| 111 | (defun rlogin-with-args (host args) | 115 | (defun rlogin-with-args (host args) |
| @@ -156,8 +160,7 @@ is intended primarily for use by `rlogin-filter'." | |||
| 156 | If `rlogin-mode-hook' is set, run it." | 160 | If `rlogin-mode-hook' is set, run it." |
| 157 | (interactive) | 161 | (interactive) |
| 158 | (kill-all-local-variables) | 162 | (kill-all-local-variables) |
| 159 | (comint-mode) | 163 | (shell-mode) |
| 160 | (setq comint-prompt-regexp shell-prompt-pattern) | ||
| 161 | (setq major-mode 'rlogin-mode) | 164 | (setq major-mode 'rlogin-mode) |
| 162 | (setq mode-name "rlogin") | 165 | (setq mode-name "rlogin") |
| 163 | (use-local-map rlogin-mode-map) | 166 | (use-local-map rlogin-mode-map) |