From: Andrea Corallo Date: Mon, 23 Sep 2019 09:48:19 +0000 (+0200) Subject: add comp-native-compiling flag X-Git-Tag: emacs-28.0.90~2727^2~1109 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb25117eb40a08824142a5a56acc14d3fb4c89a4;p=emacs.git add comp-native-compiling flag --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index c685a516667..98d9e7376ff 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -45,6 +45,10 @@ (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)))))