Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borg-build: let-bind borg-compile-function #157

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions borg.el
Original file line number Diff line number Diff line change
Expand Up @@ -567,19 +567,20 @@ and optional NATIVE are both non-nil, then also compile natively."
(borg-clean clone)
(cond
(noninteractive
(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)))
(borg--build-noninteractive clone)
(when activate
(borg-activate clone)))
(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)))
(borg--build-noninteractive clone)
(when activate
(borg-activate clone))))
((let ((process (borg--build-interactive clone)))
(when activate
(add-function :after (process-sentinel process)
Expand Down