From bb25117eb40a08824142a5a56acc14d3fb4c89a4 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 23 Sep 2019 11:48:19 +0200 Subject: [PATCH] add comp-native-compiling flag --- lisp/emacs-lisp/comp.el | 5 +++++ 1 file changed, 5 insertions(+) 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))))) -- 2.39.5