]> git.eshelyaron.com Git - emacs.git/commitdiff
add comp-native-compiling flag
authorAndrea Corallo <akrl@sdf.org>
Mon, 23 Sep 2019 09:48:19 +0000 (11:48 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:54 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index c685a516667acf4e022c88f3730aa52b54c240d1..98d9e7376ff52704dab51c37903f8d5927f01390 100644 (file)
 (defconst native-compile-log-buffer "*Native-compile-Log*"
   "Name of the native-compiler's log buffer.")
 
+(defvar comp-native-compiling nil
+  "This gets bound to t while native compilation.
+Can be used by code that wants to expand differently in this case.")
+
 ;; FIXME these has to be removed
 (defvar comp-speed 2)
 (defvar comp-verbose nil)
@@ -1575,6 +1579,7 @@ If INPUT is a string, use it as the file path to be native compiled."
               (stringp input))
     (error "Trying to native compile something not a symbol function or file"))
   (let ((data input)
+        (comp-native-compiling t)
         (comp-ctxt (make-comp-ctxt :output (if (symbolp input)
                                                (symbol-name input)
                                              (file-name-sans-extension input)))))