summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-09-08 07:01:42 +0000
committerRoland McGrath <roland@gnu.org>1993-09-08 07:01:42 +0000
commit36df718cbf8a6ac82bedc4d6ec244e6cd2db5abc (patch)
tree0a83dfd697c209ab85311f9d770ab8de9d2b25ac /lisp
parentfdfe2a28762cc7442e26371aa3b77bac5530366d (diff)
downloademacs-36df718cbf8a6ac82bedc4d6ec244e6cd2db5abc.tar.gz
(shell-resync-dirs, shell-process-cd, shell-process-pushd,
shell-process-popd): Prepend comint-filename-prefix to directory names when calling cd.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/shell.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index ccd3bf9fd90..ef7474ae822 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -382,7 +382,8 @@ Environment variables are expanded, see function `substitute-in-file-name'."
(shell-extract-num arg))))
(if (and num (< num (length shell-dirstack)))
(if (= num 0) ; condition-case because the CD could lose.
- (condition-case nil (progn (cd (car shell-dirstack))
+ (condition-case nil (progn (cd (concat comint-filename-prefix
+ (car shell-dirstack)))
(setq shell-dirstack
(cdr shell-dirstack))
(shell-dirstack-message))
@@ -403,7 +404,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
((string-equal "-" arg) shell-last-dir)
(t arg))))
(setq shell-last-dir default-directory)
- (cd new-dir)
+ (cd (concat comint-filename-prefix new-dir))
(shell-dirstack-message))
(error (message "Couldn't cd."))))
@@ -413,7 +414,8 @@ Environment variables are expanded, see function `substitute-in-file-name'."
;; no arg -- swap pwd and car of shell stack
(condition-case nil (if shell-dirstack
(let ((old default-directory))
- (cd (car shell-dirstack))
+ (cd (concat comint-filename-prefix
+ (car shell-dirstack)))
(setq shell-dirstack
(cons old (cdr shell-dirstack)))
(shell-dirstack-message))
@@ -431,7 +433,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
(back (reverse (nthcdr (- dslen num) (reverse ds))))
(new-ds (append front back)))
(condition-case nil
- (progn (cd (car new-ds))
+ (progn (cd (concat comint-filename-prefix (car new-ds)))
(setq shell-dirstack (cdr new-ds))
(shell-dirstack-message))
(error (message "Couldn't cd.")))))
@@ -439,7 +441,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
;; pushd <dir>
(let ((old-wd default-directory))
(condition-case nil
- (progn (cd arg)
+ (progn (cd (concat comint-filename-prefix arg))
(setq shell-dirstack
(cons old-wd shell-dirstack))
(shell-dirstack-message))
@@ -501,7 +503,7 @@ command again."
(setq i (match-end 0)))
(let ((ds (reverse ds)))
(condition-case nil
- (progn (cd (car ds))
+ (progn (cd (concat comint-filename-prefix (car ds)))
(setq shell-dirstack (cdr ds))
(shell-dirstack-message))
(error (message "Couldn't cd.")))))))