From 2121cd9c03da0e8b11950d784ca35cf981525d15 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 30 Sep 1995 16:35:12 +0000 Subject: [PATCH] (cd): Fix interactive spec to require match if there is no CDPATH. --- lisp/files.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.2