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

@ -69,8 +69,6 @@
"--eval"
(prin1-to-string
`(progn
(defvar doom-interactive-p nil)
(defvar doom-debug-p ,doom-debug-p)
(require 'cl-lib)
(require 'subr-x)
(load ,(doom-path doom-core-dir "autoload/print"))
@ -111,10 +109,10 @@
(defun +literate-tangle-h ()
"Tangles `+literate-config-file' if it has changed.
This is performed with an asyncronous Emacs process, except when
`doom-interactive-p' is non-nil."
(if doom-interactive-p
(+literate-tangle--async)
(+literate-tangle--sync)))
`noninteractive' is nil."
(if noninteractive
(+literate-tangle--sync)
(+literate-tangle--async)))
;;;###autoload
(defun +literate-tangle-check-finished-h ()

View file

@ -19,7 +19,7 @@
;; disable modules, and to reduce the effort required to maintain our copy of
;; `evil-collection-list' (now I can just copy it from time to time).
(when (and doom-interactive-p
(when (and (not noninteractive)
(not doom-reloading-p)
(featurep! +everywhere))

View file

@ -34,7 +34,7 @@
;; Reduce verbosity. 3 is too chatty about initializing yasnippet. 2 is just
;; right (only shows errors).
(setq yas-verbosity (if doom-debug-p 3 0))
(setq yas-verbosity (if init-file-debug 3 0))
;; default snippets library, if available
(add-to-list 'load-path +snippets-dir)

View file

@ -197,7 +197,7 @@ Dictionary.app behind the scenes to get definitions.")
:init
(add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn)
:config
(setq dash-docs-enable-debugging doom-debug-p
(setq dash-docs-enable-debugging init-file-debug
dash-docs-docsets-path (concat doom-etc-dir "docsets/")
dash-docs-min-length 2
dash-docs-browser-func #'eww)