From 8e231c0dda4d393cc18561b2ceeff250965049b8 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Thu, 23 Jul 2020 20:24:32 -0400 Subject: Implement compile-time conditional expansion. --- init.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 7e33dc1..f2dff6c 100644 --- a/init.el +++ b/init.el @@ -143,6 +143,12 @@ (path (expand-file-name file-name module-directory))) `(insert-code-from-file ,path))) +(defmacro expand-when (conditional &rest form) + "Expand if and only if `CONDITIONAL' is truthy at compile-time." + (if (eval conditional) + `(progn ,@form) + '(progn))) + (load-module "core") (load-module "jakob") (load-module "appearance") -- cgit v1.3