From: Roland McGrath Date: Sat, 30 Sep 1995 16:35:12 +0000 (+0000) Subject: (cd): Fix interactive spec to require match if there is no CDPATH. X-Git-Tag: emacs-19.34~2765 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2121cd9c03da0e8b11950d784ca35cf981525d15;p=emacs.git (cd): Fix interactive spec to require match if there is no CDPATH. --- diff --git a/lisp/files.el b/lisp/files.el index a2289337777..529c3d7bd5b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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)