Function: native-compile-directory
native-compile-directory is an autoloaded and byte-compiled function
defined in comp.el.gz.
Signature
(native-compile-directory DIRECTORY)
Documentation
Native compile if necessary all the .el files present in DIRECTORY.
Each .el file is native-compiled if the corresponding .eln file is not
found in any directory mentioned in native-comp-eln-load-path.
The search within DIRECTORY is performed recursively.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
;;;###autoload
(defun native-compile-directory (directory)
"Native compile if necessary all the .el files present in DIRECTORY.
Each .el file is native-compiled if the corresponding .eln file is not
found in any directory mentioned in `native-comp-eln-load-path'.
The search within DIRECTORY is performed recursively."
(mapc (lambda (file)
(unless (comp-lookup-eln file)
(native-compile file)))
(directory-files-recursively directory ".+\\.el\\'")))