mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
guix: emacs-utils: Support disabling native-compilation.
* guix/build/emacs-utils.scm (emacs-batch-disable-compilation): Add ‘native?’ argument and honour it.
This commit is contained in:
parent
a86979b41a
commit
8b809a31fa
1 changed files with 8 additions and 3 deletions
|
@ -75,10 +75,15 @@ true, evaluate using dynamic scoping."
|
||||||
(string-append "--visit=" file)
|
(string-append "--visit=" file)
|
||||||
(string-append "--eval=" (expr->string expr))))
|
(string-append "--eval=" (expr->string expr))))
|
||||||
|
|
||||||
(define (emacs-batch-disable-compilation file)
|
(define* (emacs-batch-disable-compilation file #:key native?)
|
||||||
|
"Disable byte compilation for FILE.
|
||||||
|
If NATIVE?, only disable native compilation."
|
||||||
(emacs-batch-edit-file file
|
(emacs-batch-edit-file file
|
||||||
'(progn
|
`(progn
|
||||||
(add-file-local-variable 'no-byte-compile t)
|
(add-file-local-variable ',(if native?
|
||||||
|
'no-native-compile
|
||||||
|
'no-byte-compile)
|
||||||
|
t)
|
||||||
(basic-save-buffer))))
|
(basic-save-buffer))))
|
||||||
|
|
||||||
(define-condition-type &emacs-batch-error &error
|
(define-condition-type &emacs-batch-error &error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue