diff options
| author | Juanma Barranquero | 2002-10-21 07:00:52 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-10-21 07:00:52 +0000 |
| commit | c4e5b8886f8fd722c298d1a6c12bec1f1898cafa (patch) | |
| tree | e6f18d18075ea61287e2e5ac1f416216bb9fc09e | |
| parent | 7a362b93f32459e2f992ec8df0fbcbc5351cd3d1 (diff) | |
| download | emacs-c4e5b8886f8fd722c298d1a6c12bec1f1898cafa.tar.gz emacs-c4e5b8886f8fd722c298d1a6c12bec1f1898cafa.zip | |
(directory-files-and-attributes): Copy docstring from Emacs 21. Arg DIR renamed
to DIRECTORY for consistency.
| -rw-r--r-- | lisp/eshell/esh-util.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index ef4bcda31a0..ce1fa52c375 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el | |||
| @@ -588,14 +588,20 @@ Unless optional argument INPLACE is non-nil, return a new string." | |||
| 588 | string))) | 588 | string))) |
| 589 | 589 | ||
| 590 | (unless (fboundp 'directory-files-and-attributes) | 590 | (unless (fboundp 'directory-files-and-attributes) |
| 591 | (defun directory-files-and-attributes (dir &optional full match nosort) | 591 | (defun directory-files-and-attributes (directory &optional full match nosort) |
| 592 | (documentation 'directory-files) | 592 | "Return a list of names of files and their attributes in DIRECTORY. |
| 593 | (let ((dir (expand-file-name dir)) ange-cache) | 593 | There are three optional arguments: |
| 594 | If FULL is non-nil, return absolute file names. Otherwise return names | ||
| 595 | that are relative to the specified directory. | ||
| 596 | If MATCH is non-nil, mention only file names that match the regexp MATCH. | ||
| 597 | If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | ||
| 598 | NOSORT is useful if you plan to sort the result yourself." | ||
| 599 | (let ((directory (expand-file-name directory)) ange-cache) | ||
| 594 | (mapcar | 600 | (mapcar |
| 595 | (function | 601 | (function |
| 596 | (lambda (file) | 602 | (lambda (file) |
| 597 | (cons file (eshell-file-attributes (expand-file-name file dir))))) | 603 | (cons file (eshell-file-attributes (expand-file-name file directory))))) |
| 598 | (directory-files dir full match nosort))))) | 604 | (directory-files directory full match nosort))))) |
| 599 | 605 | ||
| 600 | (eval-when-compile | 606 | (eval-when-compile |
| 601 | (defvar ange-cache)) | 607 | (defvar ange-cache)) |