diff options
| -rw-r--r-- | init.el | 6 | ||||
| -rw-r--r-- | lisp/appearance/modeline.el | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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") diff --git a/lisp/appearance/modeline.el b/lisp/appearance/modeline.el index 296a4f5..4fa1710 100644 --- a/lisp/appearance/modeline.el +++ b/lisp/appearance/modeline.el @@ -29,7 +29,7 @@ ;; ;; Obviously, my tower lacks a battery, so I only enable this on my laptop. -(when (string= (system-name) "Upsilon") +(expand-when (string= (system-name) "Upsilon") (require 'battery) (display-battery-mode +1) (setq battery-mode-line-format "%L: %t, %p%%%%")) |