diff --git a/lisp/lib/files.el b/lisp/lib/files.el index 022be0003..94b47d4a3 100644 --- a/lisp/lib/files.el +++ b/lisp/lib/files.el @@ -594,7 +594,12 @@ see), and if nil, defaults to `find-sibling-rules'." (nconc results (mapcar #'expand-file-name - (file-expand-wildcards expansion nil t))))))))) + ;; `file-expand-wildcards' has a new REGEXP + ;; argument in 29+ that is needed here. This swap + ;; makes it behave as if REGEXP == t. + (letf! (defun wildcard-to-regexp (wildcard) + (concat "\\`" wildcard "\\'")) + (file-expand-wildcards expansion nil)))))))))) ;; Delete the file itself (in case it matched), and remove ;; duplicates, in case we have several expansions and some match ;; the same subsets of files.