From eb22177cea10fbcef53206384874a5363265d285 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 24 Apr 2019 18:04:17 -0400 Subject: [PATCH] Suppress kill-emacs-hook in noninteractive Doom --- core/autoload/scratch.el | 3 ++- core/core-projects.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/autoload/scratch.el b/core/autoload/scratch.el index 660ad30d0..64f233599 100644 --- a/core/autoload/scratch.el +++ b/core/autoload/scratch.el @@ -78,7 +78,8 @@ following: (doom|persist-scratch-buffer)))) ;;;###autoload -(add-hook 'kill-emacs-hook #'doom|persist-scratch-buffers) +(unless noninteractive + (add-hook 'kill-emacs-hook #'doom|persist-scratch-buffers)) ;; diff --git a/core/core-projects.el b/core/core-projects.el index a52bcbc95..e69b3cb5d 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -68,7 +68,8 @@ c) are not valid projectile projects." and do (remhash proot projectile-projects-cache-time) and do (remhash proot projectile-project-type-cache)) (projectile-serialize-cache))) - (add-hook 'kill-emacs-hook #'doom|cleanup-project-cache) + (unless noninteractive + (add-hook 'kill-emacs-hook #'doom|cleanup-project-cache)) ;; It breaks projectile's project root resolution if HOME is a project (e.g. ;; it's a git repo). In that case, we disable bottom-up root searching to