[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 40f655e 1/2: * Add 'comp-deferred-compilation-black-
From: |
Andrea Corallo |
Subject: |
feature/native-comp 40f655e 1/2: * Add 'comp-deferred-compilation-black-list' customize |
Date: |
Sat, 9 May 2020 10:04:01 -0400 (EDT) |
branch: feature/native-comp
commit 40f655e0505d954e507ead5f5bda7dc7113adc06
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* Add 'comp-deferred-compilation-black-list' customize
* lisp/emacs-lisp/comp.el (comp-deferred-compilation-black-list):
New customize.
(native-compile-async): Make use of
'comp-deferred-compilation-black-list'.
---
lisp/emacs-lisp/comp.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 6164103..e6a43b8 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -84,6 +84,13 @@ This intended for debugging the compiler itself.
:type 'boolean
:group 'comp)
+(defcustom comp-deferred-compilation-black-list
+ '()
+ "List of regexps to exclude files from deferred native compilation.
+Skip if any is matching."
+ :type 'list
+ :group 'comp)
+
(defcustom comp-bootstrap-black-list
'("^leim/")
"List of regexps to exclude files from native compilation during bootstrap.
@@ -2369,7 +2376,12 @@ LOAD can be nil t or 'late."
queued with LOAD %"
file load (cdr entry))
;; Make sure we are not already compiling `file' (bug#40838).
- (unless (gethash file comp-async-compilations)
+ (unless (and (gethash file comp-async-compilations)
+ ;; Exclude some file from deferred compilation if
+ ;; `comp-deferred-compilation-black-list' says so.
+ (or (not (eq load 'late))
+ (cl-notany (lambda (re) (string-match re file))
+ comp-deferred-compilation-black-list)))
(let ((out-dir (comp-output-directory file))
(out-filename (comp-output-filename file)))
(if (or (file-writable-p out-filename)