# HG changeset patch # User Juanma Barranquero # Date 1035183652 0 # Node ID 39dffdbc68924a9f491e199e80e85c34debb297d # Parent 5e6ae1ee7a6ff237ca7f0b1184dd614dbf47823d (directory-files-and-attributes): Copy docstring from Emacs 21. Arg DIR renamed to DIRECTORY for consistency. diff -r 5e6ae1ee7a6f -r 39dffdbc6892 lisp/eshell/esh-util.el --- a/lisp/eshell/esh-util.el Mon Oct 21 00:06:33 2002 +0000 +++ b/lisp/eshell/esh-util.el Mon Oct 21 07:00:52 2002 +0000 @@ -588,14 +588,20 @@ 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))