Mercurial > emacs
comparison lisp/files.el @ 13095:8477c2dca6b0
(cd): Fix interactive spec to require match if there is no CDPATH.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Sat, 30 Sep 1995 16:35:12 +0000 |
parents | 9f60089ce2bb |
children | b4601a8c1e5c |
comparison
equal
deleted
inserted
replaced
13094:ad51fb37d568 | 13095:8477c2dca6b0 |
---|---|
298 "Make DIR become the current buffer's default directory. | 298 "Make DIR become the current buffer's default directory. |
299 If your environment includes a `CDPATH' variable, try each one of that | 299 If your environment includes a `CDPATH' variable, try each one of that |
300 colon-separated list of directories when resolving a relative directory name." | 300 colon-separated list of directories when resolving a relative directory name." |
301 (interactive | 301 (interactive |
302 (list (read-file-name "Change default directory: " | 302 (list (read-file-name "Change default directory: " |
303 default-directory default-directory))) | 303 default-directory default-directory |
304 (and (member cd-path '(nil ("./"))) | |
305 (null (getenv "CDPATH")))))) | |
304 (if (file-name-absolute-p dir) | 306 (if (file-name-absolute-p dir) |
305 (cd-absolute (expand-file-name dir)) | 307 (cd-absolute (expand-file-name dir)) |
306 (if (null cd-path) | 308 (if (null cd-path) |
307 (let ((trypath (parse-colon-path (getenv "CDPATH")))) | 309 (let ((trypath (parse-colon-path (getenv "CDPATH")))) |
308 (setq cd-path (or trypath (list "./"))))) | 310 (setq cd-path (or trypath (list "./"))))) |