# HG changeset patch # User Richard M. Stallman # Date 772413133 0 # Node ID bedead77e86fb737a4e79d055bfa86eada4f6e5f # Parent 936532a595ddba36cfe8e6c019b53416edc3a821 (shell-prefixed-directory-name): Do nothing if comint-file-name-prefix is empty. Do not inline. diff -r 936532a595dd -r bedead77e86f lisp/shell.el --- 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)