From 8b809a31faa2a632ca53756a5fb32f8b291676f7 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 14 Oct 2022 20:41:33 +0200 Subject: guix: emacs-utils: Support disabling native-compilation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/build/emacs-utils.scm (emacs-batch-disable-compilation): Add ‘native?’ argument and honour it. --- guix/build/emacs-utils.scm | 11 ++++++++--- 1 file 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 -- cgit 1.4.1