refactor: remove unused core variables

doom-debug-p and doom-interactive-p have always been intentionally
redundant, because changing the variables they replaced had other
side-effects, which made writing tests for them difficult. Since our
new (yet unpublished) tests lean heavily toward integration testing more
than unit testing, this becomes an implementation detail.

And doom-init-p's only use was refactor out at some point in the past,
so it's no longer used.

Also done to reduce Doom's footprint, in general.
This commit is contained in:
Henrik Lissner 2022-06-24 21:15:31 +02:00
parent 74cc541597
commit 14b2395424
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
22 changed files with 55 additions and 76 deletions

View file

@ -484,7 +484,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
(use-package! dtrt-indent
;; Automatic detection of indent settings
:when doom-interactive-p
:unless noninteractive
;; I'm not using `global-dtrt-indent-mode' because it has hard-coded and rigid
;; major mode checks, so I implement it in `doom-detect-indentation-h'.
:hook ((change-major-mode-after-body read-only-mode) . doom-detect-indentation-h)
@ -496,7 +496,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
(memq major-mode doom-detect-indentation-excluded-modes)
(member (substring (buffer-name) 0 1) '(" " "*")))
;; Don't display messages in the echo area, but still log them
(let ((inhibit-message (not doom-debug-p)))
(let ((inhibit-message (not init-file-debug)))
(dtrt-indent-mode +1))))
;; Enable dtrt-indent even in smie modes so that it can update `tab-width',