(cd): Fix interactive spec to require match if there is no CDPATH.

This commit is contained in:
Roland McGrath 1995-09-30 16:35:12 +00:00
parent a6ed60f493
commit 2121cd9c03

View file

@ -300,7 +300,9 @@ If your environment includes a `CDPATH' variable, try each one of that
colon-separated list of directories when resolving a relative directory name."
(interactive
(list (read-file-name "Change default directory: "
default-directory default-directory)))
default-directory default-directory
(and (member cd-path '(nil ("./")))
(null (getenv "CDPATH"))))))
(if (file-name-absolute-p dir)
(cd-absolute (expand-file-name dir))
(if (null cd-path)