From: Lars Ingebrigtsen Date: Fri, 10 Jun 2022 08:19:15 +0000 (+0200) Subject: Allow specifying a wildcard argument to list-directory again X-Git-Tag: emacs-29.0.90~1910^2~108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ee736a884766f2017a934d936bfbfa4c70b5099;p=emacs.git Allow specifying a wildcard argument to list-directory again * lisp/files.el (list-directory): Allow specifying a wildcard argument interactively again (bug#55877). --- diff --git a/lisp/files.el b/lisp/files.el index 5f4c4fa0176..8836ee6fb21 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7386,12 +7386,11 @@ and `list-directory-verbose-switches'." (list (read-file-name (if pfx "List directory (verbose): " "List directory (brief): ") - nil default-directory t - nil + nil default-directory (lambda (file) (or (file-directory-p file) (insert-directory-wildcard-in-dir-p - (expand-file-name file))))) + (file-name-as-directory (expand-file-name file)))))) pfx))) (let ((switches (if verbose list-directory-verbose-switches list-directory-brief-switches))