]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-prefixed-directory-name): Do nothing if
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Jun 1994 23:12:13 +0000 (23:12 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Jun 1994 23:12:13 +0000 (23:12 +0000)
comint-file-name-prefix is empty.  Do not inline.

lisp/shell.el

index 85db10b4fd74223729e8d5983e680e8ad650da3d..8c38328b82fb25aede386a157efcf89e6c1a7288 100644 (file)
@@ -480,12 +480,14 @@ Environment variables are expanded, see function `substitute-in-file-name'."
           (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)