summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-10-14 20:41:33 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-10-14 20:41:33 +0200
commit8b809a31faa2a632ca53756a5fb32f8b291676f7 (patch)
tree617dc78b7d7e1fb76bda8f3823284874f4e7e246 /guix
parenta86979b41a49a8fcdaa887970ba594dbba701226 (diff)
guix: emacs-utils: Support disabling native-compilation.
* guix/build/emacs-utils.scm (emacs-batch-disable-compilation): Add ‘native?’ argument and honour it.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/emacs-utils.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index ede400ffb2..850b1f5f2a 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -75,10 +75,15 @@ true, evaluate using dynamic scoping."
(string-append "--visit=" file)
(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
- '(progn
- (add-file-local-variable 'no-byte-compile t)
+ `(progn
+ (add-file-local-variable ',(if native?
+ 'no-native-compile
+ 'no-byte-compile)
+ t)
(basic-save-buffer))))
(define-condition-type &emacs-batch-error &error