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
2bef807c
Commit
2bef807c
authored
Dec 04, 2014
by
Eli Zaretskii
Browse files
lisp/files.el (file-tree-walk): Doc fix.
parent
a0363ffa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/files.el
lisp/files.el
+10
-3
No files found.
lisp/ChangeLog
View file @
2bef807c
2014-12-04 Eli Zaretskii <eliz@gnu.org>
* files.el (file-tree-walk): Doc fix.
2014-12-04 Rupert Swarbrick <ruperts@broadcom.com> (tiny change)
Rüdiger Sonderfeld <ruediger@c-plusplus.net>
...
...
lisp/files.el
View file @
2bef807c
...
...
@@ -730,10 +730,17 @@ The path separator is colon in GNU and GNU-like systems."
(
error
"No such directory found via CDPATH environment variable"
))))
(
defun
file-tree-walk
(
dir
action
&rest
args
)
"Walk DIR executing ACTION on each path, with ARGS as additional arguments.
Each call gets as arguments DIR, a file path, and optional ARGS.
"Walk DIR executing ACTION on each file, with ARGS as additional arguments.
For each file, the function calls ACTION as follows:
\(ACTION DIRECTORY BASENAME ARGS\)
Where DIRECTORY is the leading directory of the file,
BASENAME is the basename of the file,
and ARGS are as specified in the call to this function, or nil if omitted.
The ACTION is applied to each subdirectory before descending into
it, and if nil is returned at that point the descent will be
it, and if nil is returned at that point
,
the descent will be
prevented. Directory entries are sorted with string-lessp."
(
cond
((
file-directory-p
dir
)
(
or
(
char-equal
?/
(
aref
dir
(
1-
(
length
dir
))))
...
...
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