From 217252e361f7b5c6cebd56625c609350d5108f09 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Mar 2020 19:09:19 -0400 Subject: [PATCH] Wrap gcmh-mode bootstrap in interactive check The interactive check is necessary until I've pushed the new CLI. --- core/core.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/core.el b/core/core.el index 64c0fda4a..5f43e72e1 100644 --- a/core/core.el +++ b/core/core.el @@ -291,14 +291,15 @@ users).") ;; Adopt a sneaky garbage collection strategy of waiting until idle time to ;; collect; staving off the collector while the user is working. -(setq gc-cons-percentage 0.6) -(add-transient-hook! 'pre-command-hook (gcmh-mode +1)) -(with-eval-after-load 'gcmh - (setq gcmh-idle-delay 10 - gcmh-high-cons-threshold 16777216 - gcmh-verbose doom-debug-mode ; 16mb - gc-cons-percentage 0.1) - (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect)) +(when doom-interactive-mode + (setq gc-cons-percentage 0.6) + (add-transient-hook! 'pre-command-hook (gcmh-mode +1)) + (with-eval-after-load 'gcmh + (setq gcmh-idle-delay 10 + gcmh-high-cons-threshold 16777216 + gcmh-verbose doom-debug-mode ; 16mb + gc-cons-percentage 0.1) + (add-hook 'focus-out-hook #'gcmh-idle-garbage-collect))) ;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some ;; reason. Disabling it completely could have many side-effects, so we