changeset 8033:bedead77e86f

(shell-prefixed-directory-name): Do nothing if comint-file-name-prefix is empty. Do not inline.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Jun 1994 23:12:13 +0000
parents 936532a595dd
children 6094b85c40d1
files lisp/shell.el
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Thu Jun 23 23:11:23 1994 +0000
+++ b/lisp/shell.el	Thu Jun 23 23:12:13 1994 +0000
@@ -480,12 +480,14 @@
 	   (error "Couldn't popd")))))
 
 ;; Return DIR prefixed with comint-file-name-prefix as appropriate.
-(defsubst shell-prefixed-directory-name (dir)
-  (if (file-name-absolute-p dir)
-      ;; The name is absolute, so prepend the prefix.
-      (concat comint-file-name-prefix dir)
-    ;; For a relative name we assume default-directory already has the prefix.
-    (expand-file-name dir)))
+(defun shell-prefixed-directory-name (dir)
+  (if (= (length comint-file-name-prefix) 0)
+      dir
+    (if (file-name-absolute-p dir)
+	;; The name is absolute, so prepend the prefix.
+	(concat comint-file-name-prefix dir)
+      ;; For a relative name we assume default-directory already has the prefix.
+      (expand-file-name dir))))
 
 ;;; cd [dir]
 (defun shell-process-cd (arg)