\f
* Lisp Changes in Emacs 31.1
+---
+** New function 'native-compile-directory'.
+This function native compiles all Lisp files in a directory and in its
+sub-directories (if they are not already native compiled).
+
+++
** The 'defcustom' :local keyword can now be 'permanent-only'.
This means that the variable's 'permanent-local' property is set to t,
(or native-comp-function string))))
(comp--native-compile function-or-file nil output))
+;;;###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 inside the current `native-comp-eln-load-path'. The search within
+DIRECTORY is perfomed recursively."
+ (mapc (lambda (file)
+ (unless (comp-lookup-eln file)
+ (native-compile file)))
+ (directory-files-recursively directory ".+\\.el\\'")))
+
;;;###autoload
(defun batch-native-compile (&optional for-tarball)
"Perform batch native compilation of remaining command-line arguments.