summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2002-10-21 07:00:52 +0000
committerJuanma Barranquero <lekktu@gmail.com>2002-10-21 07:00:52 +0000
commitc4e5b8886f8fd722c298d1a6c12bec1f1898cafa (patch)
treee6f18d18075ea61287e2e5ac1f416216bb9fc09e /lisp/eshell
parent7a362b93f32459e2f992ec8df0fbcbc5351cd3d1 (diff)
downloademacs-c4e5b8886f8fd722c298d1a6c12bec1f1898cafa.tar.gz
(directory-files-and-attributes): Copy docstring from Emacs 21. Arg DIR renamed
to DIRECTORY for consistency.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-util.el16
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."
string)))
(unless (fboundp 'directory-files-and-attributes)
- (defun directory-files-and-attributes (dir &optional full match nosort)
- (documentation 'directory-files)
- (let ((dir (expand-file-name dir)) ange-cache)
+ (defun directory-files-and-attributes (directory &optional full match nosort)
+ "Return a list of names of files and their attributes in DIRECTORY.
+There are three optional arguments:
+If FULL is non-nil, return absolute file names. Otherwise return names
+ that are relative to the specified directory.
+If MATCH is non-nil, mention only file names that match the regexp MATCH.
+If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
+ NOSORT is useful if you plan to sort the result yourself."
+ (let ((directory (expand-file-name directory)) ange-cache)
(mapcar
(function
(lambda (file)
- (cons file (eshell-file-attributes (expand-file-name file dir)))))
- (directory-files dir full match nosort)))))
+ (cons file (eshell-file-attributes (expand-file-name file directory)))))
+ (directory-files directory full match nosort)))))
(eval-when-compile
(defvar ange-cache))