diff options
| author | Glenn Morris | 2018-06-02 10:25:50 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-06-02 10:25:50 -0700 |
| commit | 42a851c6347bb45a2fb8acdb0d2a1ca468ecefd3 (patch) | |
| tree | bfd595460df8864956639fecc13636a94d413212 /src | |
| parent | 4a7e74fea687011ee81dcbb02294bccd99b3a05f (diff) | |
| parent | ca3f0a8343c125a44845d21808ab0e35b87533db (diff) | |
| download | emacs-42a851c6347bb45a2fb8acdb0d2a1ca468ecefd3.tar.gz emacs-42a851c6347bb45a2fb8acdb0d2a1ca468ecefd3.zip | |
Merge from origin/emacs-26
ca3f0a8 ; * etc/NEWS: Belated announcement of 2 changes made in Emacs...
99f92da Improve documentation of 'directory-files-and-attributes'
df8649a * lisp/gnus/message.el (message-remove-header): Don't remove ...
b682a7e ; * etc/NEWS: Add headings for Emacs 26.2
aa175a4 Adapt hexl-mode to native line-number display
b8e7749 Fix example in Tramp manual
f212fe5 Handle case where Xft is found but not XRender
186280f * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh...
24ba633 Improve read-multiple-choice docstring (Bug#31628)
Conflicts:
etc/NEWS
src/dired.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dired.c b/src/dired.c index 115413dd6bc..a753b1930e6 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -358,17 +358,14 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 358 | DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, | 358 | DEFUN ("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. |
| 361 | The list returned has elements that contain the data from | 361 | Value is a list of the form: |
| 362 | `file-attributes' for each file -- with the file name prepended. So | ||
| 363 | the structure of each element is | ||
| 364 | `(FILE-NAME FILE-ATTRIBUTE1 FILE-ATTRIBUTE2 ...)'. | ||
| 365 | 362 | ||
| 366 | For instance, to get the size of the fourth element in a directory, | 363 | ((FILE1 FILE1-ATTRS) (FILE2 FILE2-ATTRS) ...) |
| 367 | you could say: | ||
| 368 | 364 | ||
| 369 | (file-attribute-size (cdr (nth 3 (directory-files-and-attributes "/")))) | 365 | where each FILEn-ATTRS is the attributes of FILEn as returned |
| 366 | by `file-attributes'. | ||
| 370 | 367 | ||
| 371 | There are four optional arguments: | 368 | This function accepts four optional arguments: |
| 372 | If FULL is non-nil, return absolute file names. Otherwise return names | 369 | If FULL is non-nil, return absolute file names. Otherwise return names |
| 373 | that are relative to the specified directory. | 370 | that are relative to the specified directory. |
| 374 | If MATCH is non-nil, mention only file names that match the regexp MATCH. | 371 | If MATCH is non-nil, mention only file names that match the regexp MATCH. |