diff options
Diffstat (limited to 'ennum.el')
-rw-r--r-- | ennum.el | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -294,15 +294,18 @@ last form in BODY." (insert-file-contents ,file) ,@body)) -(defun ennum-directory-files (directory &optional full include-directories) +(defun ennum-directory-files (&optional directory full include-directories) "Return recursively the list of all files under DIRECTORY. Files are returned in depth first order. -If FULL is non-nil, absolute file names are returned. Else, the -file names are relative to DIRECTORY. If INCLUDE-DIRECTORIES is -non-nil, include directories in the output." - (let ((files (directory-files-recursively - directory (rx anything) include-directories))) +If DIRECTORY is nil, the current working directory is assumed. If +FULL is non-nil, absolute file names are returned. Else, the file +names are relative to the current directory. If +INCLUDE-DIRECTORIES is non-nil, include directories in the +output." + (let* ((directory (or directory default-directory)) + (files (directory-files-recursively + directory (rx anything) include-directories))) (if full files (seq-map (apply-partially 'string-remove-prefix |