Add 'native-compile-directory' (bug#73303)
* lisp/emacs-lisp/comp.el (native-compile-directory): New function. * etc/NEWS (native-compile-directory): Add to NEWS.
This commit is contained in:
parent
202adfcfcc
commit
246d68bd2a
2 changed files with 16 additions and 0 deletions
|
@ -3662,6 +3662,17 @@ the compilation was successful return the compiled function."
|
|||
(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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue