Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9daefb36
Commit
9daefb36
authored
May 24, 1993
by
Richard M. Stallman
Browse files
(cd): Set cd-path to a list.
parent
7ee260fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lisp/files.el
lisp/files.el
+6
-4
No files found.
lisp/files.el
View file @
9daefb36
...
...
@@ -246,7 +246,10 @@ Not actually set up until the first time you you use it.")
(
setq
cd-path
(
concat
cd-path
":"
))
(
while
(
setq
cd-colon
(
string-match
":"
cd-path
cd-start
))
(
setq
cd-list
(
nconc
cd-list
(
list
(
substitute-in-file-name
(
file-name-as-directory
(
substring
cd-path
cd-start
cd-colon
))))))
(
nconc
cd-list
(
list
(
substitute-in-file-name
(
file-name-as-directory
(
substring
cd-path
cd-start
cd-colon
))))))
(
setq
cd-start
(
+
cd-colon
1
)))
cd-list
)))
...
...
@@ -260,8 +263,7 @@ Not actually set up until the first time you you use it.")
(
error
"%s is not a directory"
dir
)
(
if
(
file-executable-p
dir
)
(
setq
default-directory
dir
)
(
error
"Cannot cd to %s: Permission denied"
dir
)))
)
(
error
"Cannot cd to %s: Permission denied"
dir
))))
(
defun
cd
(
dir
)
"Make DIR become the current buffer's default directory.
...
...
@@ -273,7 +275,7 @@ colon-separated list of directories when resolving a relative cd."
(
cd-absolute
(
expand-file-name
dir
))
(
if
(
null
cd-path
)
(
let
((
trypath
(
parse-colon-path
(
getenv
"CDPATH"
))))
(
setq
cd-path
(
or
trypath
"./"
))))
(
setq
cd-path
(
or
trypath
(
list
"./"
))))
)
(
if
(
not
(
catch
'found
(
mapcar
(
function
(
lambda
(
x
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment