aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-23 23:12:13 +0000
committerRichard M. Stallman1994-06-23 23:12:13 +0000
commit4a02b552f18955eca58e1935334f09b9db49c8f5 (patch)
treef284280047412e99ece5f37765c16ae435f035a5 /lisp/shell.el
parentdc0825dbe3f86a9d4f09c7b1bc6a0928e590770a (diff)
downloademacs-4a02b552f18955eca58e1935334f09b9db49c8f5.tar.gz
emacs-4a02b552f18955eca58e1935334f09b9db49c8f5.zip
(shell-prefixed-directory-name): Do nothing if
comint-file-name-prefix is empty. Do not inline.
Diffstat (limited to 'lisp/shell.el')
-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)