[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ffa8603: * lisp/files.el (file-tree-walk): Remove;
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master ffa8603: * lisp/files.el (file-tree-walk): Remove; of unknown authorship. |
Date: |
Thu, 08 Jan 2015 04:52:41 +0000 |
branch: master
commit ffa860390226f192f97518670c6cee4d2449cd9d
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
* lisp/files.el (file-tree-walk): Remove; of unknown authorship.
* etc/NEWS: Remove entry.
Fixes: debbugs:19325
---
etc/NEWS | 4 ----
lisp/ChangeLog | 4 ++++
lisp/files.el | 32 --------------------------------
3 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 4d704ce..f22309e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -141,10 +141,6 @@ this has no effect.
** A new text property `inhibit-read-only' can be used in read-only
buffers to allow certain parts of the text to be writable.
-** A new function `file-tree-walk' allows to apply a certain action
-to all the files and subdirectories of a directory, similarly to the C
-library function `ftw'.
-
** A new function `directory-files-recursively' returns all matching
files (recursively) under a directory.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5297877..88fd367 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-08 Glenn Morris <address@hidden>
+
+ * files.el (file-tree-walk): Remove; of unknown authorship. (Bug#19325)
+
2015-01-07 K. Handa <address@hidden>
* international/ccl.el (define-ccl-program): Improve the docstring.
diff --git a/lisp/files.el b/lisp/files.el
index 80b538c..1533c35 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -729,38 +729,6 @@ The path separator is colon in GNU and GNU-like systems."
(lambda (f) (and (file-directory-p f) 'dir-ok)))
(error "No such directory found via CDPATH environment variable"))))
-(defun file-tree-walk (dir action &rest 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
-prevented. Directory entries are sorted with string-lessp."
- (cond ((file-directory-p dir)
- (setq dir (file-name-as-directory dir))
- (let ((lst (directory-files dir nil nil t))
- fullname file)
- (while lst
- (setq file (car lst))
- (setq lst (cdr lst))
- (cond ((member file '("." "..")))
- (t
- (and (apply action dir file args)
- (setq fullname (concat dir file))
- (file-directory-p fullname)
- (apply 'file-tree-walk fullname action args)))))))
- (t
- (apply action
- (file-name-directory dir)
- (file-name-nondirectory dir)
- args))))
-
(defsubst directory-name-p (name)
"Return non-nil if NAME ends with a slash character."
(and (> (length name) 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ffa8603: * lisp/files.el (file-tree-walk): Remove; of unknown authorship.,
Glenn Morris <=