From: Paul Eggert Date: Wed, 16 Jul 2025 16:45:18 +0000 (-0700) Subject: Avoid syscall in dir-locals--all-files X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a68bd32b5a9cfc6b3ca0fe5fe960944bb7443700;p=emacs.git Avoid syscall in dir-locals--all-files * lisp/files.el (dir-locals--all-files): Omit an unnecessary call to file-directory-p. (cherry picked from commit b282cb98e498ded876b87e5e48fe74b8c45156ea) --- diff --git a/lisp/files.el b/lisp/files.el index ab3126a55bc..83842aed116 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4697,10 +4697,7 @@ those in the first." (list file-2 file-1))) (when (and f (file-readable-p f) - ;; FIXME: Aren't file-regular-p and - ;; file-directory-p mutually exclusive? - (file-regular-p f) - (not (file-directory-p f))) + (file-regular-p f)) (push f out))) out)))