]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid syscall in dir-locals--all-files
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 16 Jul 2025 16:45:18 +0000 (09:45 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 11:53:15 +0000 (13:53 +0200)
* lisp/files.el (dir-locals--all-files):
Omit an unnecessary call to file-directory-p.

(cherry picked from commit b282cb98e498ded876b87e5e48fe74b8c45156ea)

lisp/files.el

index ab3126a55bc435972e10f39cf5950a0187e973db..83842aed116b0e120d8e43e12a457ee7acc99c37 100644 (file)
@@ -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)))