[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 2ac6194 1/2: * Add new customize `comp-async-env-mod

From: Andrea Corallo
Subject: feature/native-comp 2ac6194 1/2: * Add new customize `comp-async-env-modifier-form' (Bug#40838)
Date: Mon, 18 May 2020 16:14:03 -0400 (EDT)

branch: feature/native-comp
commit 2ac619458520f1399088740e5e13751d362e55a0
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>

    * Add new customize `comp-async-env-modifier-form' (Bug#40838)
        * lisp/emacs-lisp/comp.el (comp-async-env-modifier-form): New
        (comp-run-async-workers): Make use of `comp-async-env-modifier-form'.
 lisp/emacs-lisp/comp.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index cd1e4db..f23a0b2 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -133,6 +133,12 @@ finishes compiling all input files."
   :type 'hook
   :group 'comp)
+(defcustom comp-async-env-modifier-form nil
+  "Form to be evaluated by each asyncronous compilation worker
+before compilation.  Usable to modify the compiler environment."
+  :type 'list
+  :group 'comp)
 (defvar comp-dry-run nil
   "When non nil run everything but the C back-end.")
@@ -2324,6 +2330,7 @@ display a message."
                                   comp-debug ,comp-debug
                                   comp-verbose ,comp-verbose
                                   load-path ',load-path)
+                            ,comp-async-env-modifier-form
                             (message "Compiling %s..." ,source-file)
                             (native-compile ,source-file ,(and load t))))
                    (source-file1 source-file) ;; Make the closure works :/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]