From: Stefan Monnier Date: Tue, 1 Jul 2025 20:55:14 +0000 (-0400) Subject: (load-path-filter): Loading can happen in the middle of completion X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fd894df715ab2b26456ee79ffc9e3e2cabe8e7b0;p=emacs.git (load-path-filter): Loading can happen in the middle of completion * lisp/startup.el (load-path-filter-cache-directory-files): Don't get confused by the context's `completion-regexp-list`. (cherry picked from commit b3b83b3603e9922c48eb782102933c6ac7fd16e9) --- diff --git a/lisp/startup.el b/lisp/startup.el index 5c28084e9bc..2568f0e8ba2 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1140,14 +1140,15 @@ This function is called from `load' via `load-path-filter-function'." (make-hash-table :test #'equal)))))) (if (null ht) path - (seq-filter - (lambda (dir) - (when (file-directory-p dir) - (try-completion - file - (with-memoization (gethash dir ht) - (directory-files dir nil rx t))))) - path))))) + (let ((completion-regexp-list nil)) + (seq-filter + (lambda (dir) + (when (file-directory-p dir) + (try-completion + file + (with-memoization (gethash dir ht) + (directory-files dir nil rx t))))) + path)))))) (defun command-line () "A subroutine of `normal-top-level'.