aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/shell.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 85db10b4fd7..8c38328b82f 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -480,12 +480,14 @@ Environment variables are expanded, see function `substitute-in-file-name'."
480 (error "Couldn't popd"))))) 480 (error "Couldn't popd")))))
481 481
482;; Return DIR prefixed with comint-file-name-prefix as appropriate. 482;; Return DIR prefixed with comint-file-name-prefix as appropriate.
483(defsubst shell-prefixed-directory-name (dir) 483(defun shell-prefixed-directory-name (dir)
484 (if (file-name-absolute-p dir) 484 (if (= (length comint-file-name-prefix) 0)
485 ;; The name is absolute, so prepend the prefix. 485 dir
486 (concat comint-file-name-prefix dir) 486 (if (file-name-absolute-p dir)
487 ;; For a relative name we assume default-directory already has the prefix. 487 ;; The name is absolute, so prepend the prefix.
488 (expand-file-name dir))) 488 (concat comint-file-name-prefix dir)
489 ;; For a relative name we assume default-directory already has the prefix.
490 (expand-file-name dir))))
489 491
490;;; cd [dir] 492;;; cd [dir]
491(defun shell-process-cd (arg) 493(defun shell-process-cd (arg)