aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-06-01 11:27:29 +0300
committerEli Zaretskii2018-06-01 11:27:29 +0300
commit99f92dab3d64c4ef0a38fa2f0ea5fd48b8bb2e1a (patch)
treef3e5a8390a993ccf7fb4370fa4b1e65acee7bb65
parentdf8649ac40be54cc3007241c4c1d5b1cb81c54dd (diff)
downloademacs-99f92dab3d64c4ef0a38fa2f0ea5fd48b8bb2e1a.tar.gz
emacs-99f92dab3d64c4ef0a38fa2f0ea5fd48b8bb2e1a.zip
Improve documentation of 'directory-files-and-attributes'
* doc/lispref/files.texi (Contents of Directories): Fix inaccurate description of the return value of directory-files-and-attributes. * src/dired.c (Fdirectory_files_and_attributes): Describe the function's value in more detail.
-rw-r--r--doc/lispref/files.texi4
-rw-r--r--src/dired.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index f62b670f47f..5137f3a9ab4 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2917,8 +2917,8 @@ are included.
2917This is similar to @code{directory-files} in deciding which files 2917This is similar to @code{directory-files} in deciding which files
2918to report on and how to report their names. However, instead 2918to report on and how to report their names. However, instead
2919of returning a list of file names, it returns for each file a 2919of returning a list of file names, it returns for each file a
2920list @code{(@var{filename} . @var{attributes})}, where @var{attributes} 2920list @code{(@var{filename} @var{attributes})}, where @var{attributes}
2921is what @code{file-attributes} would return for that file. 2921is what @code{file-attributes} returns for that file.
2922The optional argument @var{id-format} has the same meaning as the 2922The optional argument @var{id-format} has the same meaning as the
2923corresponding argument to @code{file-attributes} (@pxref{Definition 2923corresponding argument to @code{file-attributes} (@pxref{Definition
2924of file-attributes}). 2924of file-attributes}).
diff --git a/src/dired.c b/src/dired.c
index c446223a0bc..a753b1930e6 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -358,7 +358,14 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
358DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, 358DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes,
359 Sdirectory_files_and_attributes, 1, 5, 0, 359 Sdirectory_files_and_attributes, 1, 5, 0,
360 doc: /* Return a list of names of files and their attributes in DIRECTORY. 360 doc: /* Return a list of names of files and their attributes in DIRECTORY.
361There are four optional arguments: 361Value is a list of the form:
362
363 ((FILE1 FILE1-ATTRS) (FILE2 FILE2-ATTRS) ...)
364
365where each FILEn-ATTRS is the attributes of FILEn as returned
366by `file-attributes'.
367
368This function accepts four optional arguments:
362If FULL is non-nil, return absolute file names. Otherwise return names 369If FULL is non-nil, return absolute file names. Otherwise return names
363 that are relative to the specified directory. 370 that are relative to the specified directory.
364If MATCH is non-nil, mention only file names that match the regexp MATCH. 371If MATCH is non-nil, mention only file names that match the regexp MATCH.