summaryrefslogtreecommitdiff
path: root/lisp/rlogin.el
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-09-08 07:09:00 +0000
committerRoland McGrath <roland@gnu.org>1993-09-08 07:09:00 +0000
commit09b3e457679a6dbb5088eb80699de441d88988ad (patch)
tree97cdb3d54ad039d329fbf705b27235076d292968 /lisp/rlogin.el
parentab4c28e61c59a35ff1511e84392c42c9a5fc999c (diff)
downloademacs-09b3e457679a6dbb5088eb80699de441d88988ad.tar.gz
(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.
Diffstat (limited to 'lisp/rlogin.el')
-rw-r--r--lisp/rlogin.el19
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 @@
;;; Commentary:
;; Support for remote logins using `rlogin'.
-;;
-;; Todo: add directory tracking using ange-ftp style patchnames for the cwd.
;;; Code:
@@ -63,9 +61,7 @@ the minibuffer using the command `rlogin-password' explicitly.")
;;;###autoload
(defvar rlogin-mode-map '())
(cond ((not rlogin-mode-map)
- (setq rlogin-mode-map (full-copy-sparse-keymap comint-mode-map))
- ;(define-key rlogin-mode-map "\M-\t" 'comint-dynamic-complete)
- ;(define-key rlogin-mode-map "\M-?" 'comint-dynamic-list-completions)
+ (setq rlogin-mode-map (cons 'keymap shell-mode-map))
(define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C)
(define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
(define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
@@ -105,7 +101,15 @@ the rlogin when starting."
;; buffer from a previous exited process.
(set-marker (process-mark proc) (point-max))
(set-process-filter proc 'rlogin-filter)
- (rlogin-mode)))))
+ (rlogin-mode)
+ ;; Set the prefix for filename completion and directory tracking
+ ;; to find the remote machine's files by ftp.
+ (set (make-local-variable 'comint-filename-prefix)
+ (concat "/" host ":"))
+ ;; Presume the user will start in his remote home directory.
+ ;; If this is wrong, M-x dirs will fix it.
+ (cd-absolute (concat "/" host ":~/"))
+ ))))
;;;###autoload
(defun rlogin-with-args (host args)
@@ -156,8 +160,7 @@ is intended primarily for use by `rlogin-filter'."
If `rlogin-mode-hook' is set, run it."
(interactive)
(kill-all-local-variables)
- (comint-mode)
- (setq comint-prompt-regexp shell-prompt-pattern)
+ (shell-mode)
(setq major-mode 'rlogin-mode)
(setq mode-name "rlogin")
(use-local-map rlogin-mode-map)