diff --git a/borg.el b/borg.el index ed484c8..f777167 100644 --- a/borg.el +++ b/borg.el @@ -46,6 +46,7 @@ ;;; Code: (require 'bytecomp) +(require 'comp nil t) (require 'cl-lib) (require 'info) (require 'pcase) @@ -568,16 +569,15 @@ and optional NATIVE are both non-nil, then also compile natively." (cond (noninteractive (let ((borg-compile-function borg-compile-function)) - (when (fboundp 'comp-ensure-native-compiler) - (when native - (setq borg-compile-function - (if (functionp native) native #'borg-byte+native-compile))) - (when (memq borg-compile-function '( borg--native-compile - native-compile - native-compile-async)) - (message "WARNING: Using `%s' instead of unsuitable `%s'" - 'borg-byte+native-compile borg-compile-function) - (setq borg-compile-function #'borg-byte+native-compile))) + (when native + (setq borg-compile-function + (if (functionp native) native #'borg-byte+native-compile))) + (when (memq borg-compile-function '( borg--native-compile + native-compile + native-compile-async)) + (message "WARNING: Using `%s' instead of unsuitable `%s'" + 'borg-byte+native-compile borg-compile-function) + (setq borg-compile-function #'borg-byte+native-compile)) (borg--build-noninteractive clone) (when activate (borg-activate clone))))