From 89cc78f476ada3f3cf1f125c5c9b4e9b3e215d59 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 7 May 2024 00:14:32 +0530 Subject: (Emacs/elisp)+bytecompile? option to literate So if you don't want to, say while debugging, it won't. --- Emacs/.config/emacs/elisp/literate.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/elisp/literate.el b/Emacs/.config/emacs/elisp/literate.el index 077de93..ffd4963 100644 --- a/Emacs/.config/emacs/elisp/literate.el +++ b/Emacs/.config/emacs/elisp/literate.el @@ -92,6 +92,9 @@ (defconst +literate/elc-org-files (mapcar #'+literate/org-to-elc +literate/org-files)) +(defvar +literate/bytecompile? t + "Bytecompile all files?") + ;; Basic compilation and loading files (autoload #'org-babel-tangle-file "ob-tangle") @@ -119,22 +122,25 @@ ;; Compiling all files (defun +literate/compile-init-files () - (message "[Literate/init]: Byte compiling init files...") - (mapc #'+literate/byte-compile-if-old +literate/el-init-files) + (when +literate/bytecompile? + (message "[Literate/init]: Byte compiling init files...") + (mapc #'+literate/byte-compile-if-old +literate/el-init-files)) (message "[Literate/init]: Init files compiled!")) (defun +literate/compile-lib-files () - (message "[Literate/lib]: Byte compiling lib files...") - (mapc #'+literate/byte-compile-if-old +literate/el-lib-files) + (when +literate/bytecompile? + (message "[Literate/lib]: Byte compiling lib files...") + (mapc #'+literate/byte-compile-if-old +literate/el-lib-files)) (message "[Literate/lib]: Lib files compiled!")) (defun +literate/compile-org-files () (message "[Literate/org]: Tangling org files...") (mapc #'+literate/tangle-if-old +literate/org-files) (message "[Literate/org]: Tangled org files!") - (message "[Literate/org]: Byte compiling org files...") - (mapc #'+literate/byte-compile-if-old +literate/el-org-files) - (message "[Literate/org]: Byte compiled org files!")) + (when +literate/bytecompile? + (message "[Literate/org]: Byte compiling org files...") + (mapc #'+literate/byte-compile-if-old +literate/el-org-files) + (message "[Literate/org]: Byte compiled org files!"))) (defun +literate/compile-config () "Compile all files in +literate/org-files via org-babel-tangle." -- cgit v1.2.3-13-gbd6f