Introduce doom-interactive-mode

As soft inverse alias for noninteractive; this makes it easier to unit
test functionality that depends on the session type.
This commit is contained in:
Henrik Lissner 2019-09-03 00:36:42 -04:00
parent 91b27bdccc
commit 4b736bef68
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 23 additions and 21 deletions

View file

@ -168,7 +168,7 @@ successfully sets indent_style/indent_size.")
"Add dired directory to recentf file list."
(recentf-add-file default-directory)))
(unless noninteractive
(when doom-interactive-mode
(add-hook 'kill-emacs-hook #'recentf-cleanup)
(quiet! (recentf-mode +1))))
@ -270,7 +270,7 @@ successfully sets indent_style/indent_size.")
(use-package! dtrt-indent
;; Automatic detection of indent settings
:unless noninteractive
:when doom-interactive-mode
:defer t
:init
(add-hook! '(change-major-mode-after-body-hook read-only-mode-hook)