1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix some glitches in recent directory-files-* changes

* doc/lispref/files.texi (Contents of Directories):
Fix description of directory-files, directory-empty-p and
directory-files-and-attributes.

* etc/NEWS: Fix entry for directory-files-and-attributes.  Fix typos.

* lisp/dired.el (directory-empty-p): Move function from here ...

* lisp/files.el (directory-empty-p): ... to here.

* lisp/net/ange-ftp.el (ange-ftp-directory-files): Call `nreverse' later.

* lisp/net/tramp.el (tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes): Do not call
`nreverse'.

* src/dired.c (Fdirectory_files)
(Fdirectory_files_and_attributes): Fix docstrings.

* test/src/dired-tests.el: Removed.  Tests moved to
test/lisp/dired-tests.el.

* test/lisp/dired-tests.el (dired-test-bug27899): Tag it :unstable.
(dired-test-directory-files)
(dired-test-directory-files-and-attributes): New tests.
This commit is contained in:
Michael Albinus 2020-11-02 17:56:06 +01:00
parent 554495006e
commit e654b41c6f
12 changed files with 124 additions and 161 deletions

View file

@ -3016,20 +3016,6 @@ dired-buffers."
;; Tree Dired
;;; utility functions
(defun directory-empty-p (filename)
"Return t if FILENAME names an existing directory containing no
other files. Return nil if FILENAME does not name a directory, or if
there was trouble determining whether DIRECTORYNAME is a directory or empty.
As a special case, this function will also return t if FILENAME is the
empty string (\"\"). This quirk is due to Emacs interpreting the
empty string (in some cases) as the current directory.
Symbolic links to directories count as directories.
See `file-symlink-p' to distinguish symlinks. "
(and (file-directory-p filename)
(null (directory-files
filename nil directory-files-no-dot-files-regexp t 1))))
(defun dired-in-this-tree-p (file dir)
;;"Is FILE part of the directory tree starting at DIR?"