aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Albinus2020-11-02 17:56:06 +0100
committerMichael Albinus2020-11-02 17:56:06 +0100
commite654b41c6f9eae424736bc8845d92b9dd97ccd3e (patch)
tree53c7d09c4e5efd8f281888bc13527844a5933136 /src
parent554495006e8d33a06c5df63fd8767c1124e1ed9e (diff)
downloademacs-e654b41c6f9eae424736bc8845d92b9dd97ccd3e.tar.gz
emacs-e654b41c6f9eae424736bc8845d92b9dd97ccd3e.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/dired.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dired.c b/src/dired.c
index 120934bfe74..039dd68c177 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -169,9 +169,9 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
169{ 169{
170 ptrdiff_t ind = 0, last = MOST_POSITIVE_FIXNUM; 170 ptrdiff_t ind = 0, last = MOST_POSITIVE_FIXNUM;
171 171
172 if (!NILP(return_count)) 172 if (!NILP (return_count))
173 { 173 {
174 CHECK_FIXNAT(return_count); 174 CHECK_FIXNAT (return_count);
175 last = XFIXNAT (return_count); 175 last = XFIXNAT (return_count);
176 } 176 }
177 177
@@ -302,7 +302,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
302 302
303DEFUN ("directory-files", Fdirectory_files, Sdirectory_files, 1, 5, 0, 303DEFUN ("directory-files", Fdirectory_files, Sdirectory_files, 1, 5, 0,
304 doc: /* Return a list of names of files in DIRECTORY. 304 doc: /* Return a list of names of files in DIRECTORY.
305There are three optional arguments: 305There are four optional arguments:
306If FULL is non-nil, return absolute file names. Otherwise return names 306If FULL is non-nil, return absolute file names. Otherwise return names
307 that are relative to the specified directory. 307 that are relative to the specified directory.
308If MATCH is non-nil, mention only file names whose non-directory part 308If MATCH is non-nil, mention only file names whose non-directory part
@@ -338,7 +338,7 @@ Value is a list of the form:
338where each FILEn-ATTRS is the attributes of FILEn as returned 338where each FILEn-ATTRS is the attributes of FILEn as returned
339by `file-attributes'. 339by `file-attributes'.
340 340
341This function accepts four optional arguments: 341This function accepts five optional arguments:
342If FULL is non-nil, return absolute file names. Otherwise return names 342If FULL is non-nil, return absolute file names. Otherwise return names
343 that are relative to the specified directory. 343 that are relative to the specified directory.
344If MATCH is non-nil, mention only file names whose non-directory part 344If MATCH is non-nil, mention only file names whose non-directory part
@@ -347,10 +347,10 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
347 NOSORT is useful if you plan to sort the result yourself. 347 NOSORT is useful if you plan to sort the result yourself.
348ID-FORMAT specifies the preferred format of attributes uid and gid, see 348ID-FORMAT specifies the preferred format of attributes uid and gid, see
349 `file-attributes' for further documentation. 349 `file-attributes' for further documentation.
350On MS-Windows, performance depends on `w32-get-true-file-attributes',
351which see.
352If COUNT is non-nil and a natural number, the function will return 350If COUNT is non-nil and a natural number, the function will return
353 COUNT number of file names (if so many are present). */) 351 COUNT number of file names (if so many are present).
352On MS-Windows, performance depends on `w32-get-true-file-attributes',
353which see. */)
354 (Lisp_Object directory, Lisp_Object full, Lisp_Object match, 354 (Lisp_Object directory, Lisp_Object full, Lisp_Object match,
355 Lisp_Object nosort, Lisp_Object id_format, Lisp_Object count) 355 Lisp_Object nosort, Lisp_Object id_format, Lisp_Object count)
356{ 356{