Mercurial > emacs
changeset 10130:2fb93cbc2d87
(rlogin-initially-track-cwd): Now a 3-way flag.
(rlogin): Handle that.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 08 Dec 1994 15:05:58 +0000 |
parents | c2fa03370e73 |
children | 51b28b893fea |
files | lisp/rlogin.el |
diffstat | 1 files changed, 22 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/rlogin.el Wed Dec 07 13:17:48 1994 +0000 +++ b/lisp/rlogin.el Thu Dec 08 15:05:58 1994 +0000 @@ -23,7 +23,6 @@ ;;; Commentary: ;; Support for remote logins using `rlogin'. -;; $Id: rlogin.el,v 1.19 1994/09/19 11:47:05 pot Exp rms $ ;; If you wish for rlogin mode to prompt you in the minibuffer for ;; passwords when a password prompt appears, just enter m-x send-invisible @@ -58,9 +57,12 @@ ;;;###autoload (defvar rlogin-initially-track-cwd t - "*If non-`nil', do remote directory tracking via ange-ftp right away. -If `nil', you can still enable directory tracking by doing -`M-x dirtrack-toggle'.") + "*Control whether and how to do directory tracking in an rlogin buffer. +nil means don't do directory tracking. +t means do so using an ftp remote file name. +Any other value means do directory tracking using local file names. +This works only if the remote machine and the local one +share the same directories (through NFS).") ;; Initialize rlogin mode map. (defvar rlogin-mode-map '()) @@ -78,7 +80,7 @@ Input is sent line-at-a-time to the remote connection. Communication with the remote host is recorded in a buffer *rlogin-HOST*, -where HOST is the first word in the string ARGS. If a prefix argument is +where HOST is the first word in the string INPUT-ARGS. If a prefix argument is given and the buffer *rlogin-HOST* already exists, a new buffer with a different connection will be made. @@ -86,14 +88,20 @@ run. It can be a relative or absolute path. The variable `rlogin-explicit-args' is a list of arguments to give to -the rlogin when starting. They are added after any arguments given in ARGS. +the rlogin when starting. They are added after any arguments given in +INPUT-ARGS. -If `rlogin-initially-track-cwd' is non-nil (which is true by default), +If `rlogin-initially-track-cwd' is t (which is true by default), then the default directory in that buffer is set to a remote (FTP) file name to access your home directory on the remote machine. Occasionally this causes an error, if you cannot access the home directory on that machine. This error is harmless as long as you don't try to use -that default directory." +that default directory. + +If `rlogin-initially-track-cwd' is neither t nor nil, then the default +directory is initially set up to your (local) home directory. +This is useful if the remote machine and your local machine +share the same files via NFS." (interactive (list (read-from-minibuffer "rlogin arguments (hostname first): ") current-prefix-arg)) @@ -132,15 +140,15 @@ (rlogin-mode) ;; Set the prefix for filename completion and directory tracking ;; to find the remote machine's files by ftp. - (setq comint-file-name-prefix (concat "/" - (and user (concat user "@")) - host ":")) + (if (eq rlogin-initially-track-cwd t) + (setq comint-file-name-prefix (concat "/" + (and user (concat user "@")) + host ":"))) (and rlogin-initially-track-cwd ;; Presume the user will start in his remote home directory. ;; If this is wrong, M-x dirs will fix it. - (cd-absolute (concat "/" - (and user (concat user "@")) - host ":~/"))))))) + (cd-absolute comint-file-name-prefix)))))) + (defun rlogin-mode () "Set major-mode for rlogin sessions. If `rlogin-mode-hook' is set, run it."