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