From 3d19fab59cf53da1f26ba3e2e6f4eea9dc52c802 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 24 May 2021 13:54:13 -0400 Subject: [PATCH] Don't build vterm-module in noninteractive sessions Fixes 'doom compile' when :term vterm is enabled. Mentioned in #5086 --- modules/term/vterm/config.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/term/vterm/config.el b/modules/term/vterm/config.el index bd97af837e9..af8925cda6a 100644 --- a/modules/term/vterm/config.el +++ b/modules/term/vterm/config.el @@ -5,6 +5,15 @@ :commands vterm-mode :hook (vterm-mode . doom-mark-buffer-as-real-h) :hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm + :init + ;; HACK Because vterm clusmily forces vterm-module.so's compilation on us when + ;; the package is loaded, this is necessary to prevent it when + ;; byte-compiling this file (`use-package' blocks eagerly loads packages + ;; when compiled). + (when noninteractive + (advice-add #'vterm-module-compile :override #'ignore) + (provide 'vterm-module)) + :config (set-popup-rule! "^\\*vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)