From 2a00d784e76b6c7b976bf53b148c8a41a4c053d2 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Mon, 27 Jun 2022 23:41:24 +0100 Subject: [PATCH] Add the when-not-wm macro --- core/fg42/utils.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/fg42/utils.el b/core/fg42/utils.el index c997ec2..5d532f0 100644 --- a/core/fg42/utils.el +++ b/core/fg42/utils.el @@ -177,6 +177,12 @@ is non-nil value it means that the function can be called interactively." `(progn ,@body) nil)) +(defmacro when-not-wm (&rest body) + "Run the BODY only if not in the wm mode." + (if (not (string= (getenv "FG42_WM") "true")) + `(progn ,@body) + nil)) + (defmacro fg42/log (tag args) "If the debug is enabled log the give ARGS."