From c767928997d3015695e678d3cfad7d0a11f2da9d Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 23 Nov 2025 11:30:33 +0100 Subject: [PATCH] Only search for package descriptors in package root See the following thread for a background on this change: https://mail.gnu.org/archive/html/emacs-devel/2025-08/msg00332.html. This change reverts b81f937e. * lisp/emacs-lisp/package.el (package-dir-info): Do not recursively try to find all Lisp files that might have package metadata. (Bug#79742) --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f302887eeef..3cc0f7699fa 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1279,7 +1279,7 @@ The return result is a `package-desc'." (catch 'found (let ((files (or (and (derived-mode-p 'dired-mode) (dired-get-marked-files nil 'marked)) - (directory-files-recursively default-directory "\\.el\\'")))) + (directory-files default-directory t "\\.el\\'" t)))) ;; We sort the file names in lexicographical order, to ensure ;; that we check shorter file names first (ie. those further ;; up in the directory structure).