]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'check-declare-directory' more portable
authorEli Zaretskii <eliz@gnu.org>
Sat, 14 May 2022 16:08:55 +0000 (19:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 14 May 2022 16:08:55 +0000 (19:08 +0300)
* lisp/emacs-lisp/check-declare.el (check-declare-directory): Use
'directory-files-recursively' instead of running Find and Grep in
a subprocess.  (Bug#55386)

lisp/emacs-lisp/check-declare.el

index b3c965166b6b35f28961664f96b5b4e6d16f59c4..83187acf71e4f3ab75a92957fcedd4ce583902a5 100644 (file)
@@ -319,11 +319,7 @@ Returns non-nil if any false statements are found."
   (setq root (directory-file-name (file-relative-name root)))
   (or (file-directory-p root)
       (error "Directory `%s' not found" root))
-  (let ((files (process-lines-ignore-status
-                find-program root
-                "-name" "*.el"
-                "-exec" grep-program
-                "-l" "^[ \t]*(declare-function" "{}" "+")))
+  (let ((files (directory-files-recursively root "\\.el\\'")))
     (when files
       (apply #'check-declare-files files))))