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:
parent
74cc541597
commit
14b2395424
22 changed files with 55 additions and 76 deletions
2
bin/doom
2
bin/doom
|
@ -230,7 +230,7 @@ SEE ALSO:
|
||||||
(dolist (file loads)
|
(dolist (file loads)
|
||||||
(load (doom-path (cdr file))
|
(load (doom-path (cdr file))
|
||||||
(not (equal (car file) "--strict-load"))
|
(not (equal (car file) "--strict-load"))
|
||||||
(not doom-debug-p) t))
|
(not init-file-debug) t))
|
||||||
(dolist (form evals)
|
(dolist (form evals)
|
||||||
(eval (read (cdr form)) t)))
|
(eval (read (cdr form)) t)))
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
'(async-debug
|
'(async-debug
|
||||||
debug-on-error
|
debug-on-error
|
||||||
(debugger . doom-debugger)
|
(debugger . doom-debugger)
|
||||||
doom-debug-p
|
|
||||||
(doom-print-level . debug)
|
(doom-print-level . debug)
|
||||||
garbage-collection-messages
|
garbage-collection-messages
|
||||||
gcmh-verbose
|
gcmh-verbose
|
||||||
|
@ -33,7 +32,7 @@ symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode doom-debug-mode
|
(define-minor-mode doom-debug-mode
|
||||||
"Toggle `debug-on-error' and `doom-debug-p' for verbose logging."
|
"Toggle `debug-on-error' and `init-file-debug' for verbose logging."
|
||||||
:init-value nil
|
:init-value nil
|
||||||
:global t
|
:global t
|
||||||
(let ((enabled doom-debug-mode))
|
(let ((enabled doom-debug-mode))
|
||||||
|
@ -246,7 +245,7 @@ ready to be pasted in a bug report on github."
|
||||||
. ,(mapcar
|
. ,(mapcar
|
||||||
#'symbol-name
|
#'symbol-name
|
||||||
(delq
|
(delq
|
||||||
nil (list (cond ((not doom-interactive-p) 'batch)
|
nil (list (cond (noninteractive 'batch)
|
||||||
((display-graphic-p) 'gui)
|
((display-graphic-p) 'gui)
|
||||||
('tty))
|
('tty))
|
||||||
(if (daemonp) 'daemon)
|
(if (daemonp) 'daemon)
|
||||||
|
|
|
@ -110,13 +110,12 @@ Any of these classes can be called like functions from within `format!' and
|
||||||
(defvar doom-print-indent-increment 2
|
(defvar doom-print-indent-increment 2
|
||||||
"Steps in which to increment `doom-print-indent' for consecutive levels.")
|
"Steps in which to increment `doom-print-indent' for consecutive levels.")
|
||||||
|
|
||||||
(defvar doom-print-backend
|
(defvar doom-print-backend (if noninteractive 'ansi 'text-properties)
|
||||||
(if doom-interactive-p 'text-properties 'ansi)
|
|
||||||
"Whether to print colors/styles with ANSI codes or with text properties.
|
"Whether to print colors/styles with ANSI codes or with text properties.
|
||||||
|
|
||||||
Accepts `ansi' and `text-properties'. `nil' means don't render styles at all.")
|
Accepts `ansi' and `text-properties'. `nil' means don't render styles at all.")
|
||||||
|
|
||||||
(defvar doom-print-level (if doom-debug-p 'debug 'info)
|
(defvar doom-print-level (if init-file-debug 'debug 'info)
|
||||||
"The default level of messages to print.")
|
"The default level of messages to print.")
|
||||||
|
|
||||||
(defvar doom-print-logging-level 'debug
|
(defvar doom-print-logging-level 'debug
|
||||||
|
@ -178,7 +177,7 @@ Returns OUTPUT."
|
||||||
Does not emit the message in the echo area. This is a macro instead of a
|
Does not emit the message in the echo area. This is a macro instead of a
|
||||||
function to prevent the potentially expensive execution of its arguments when
|
function to prevent the potentially expensive execution of its arguments when
|
||||||
debug mode is off."
|
debug mode is off."
|
||||||
`(when (or doom-debug-p (not doom-interactive-p))
|
`(when (or init-file-debug noninteractive)
|
||||||
(let ((inhibit-message t))
|
(let ((inhibit-message t))
|
||||||
(message
|
(message
|
||||||
"%s" (propertize
|
"%s" (propertize
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
;; while it is lexically bound, you get "Defining as dynamic an already
|
;; while it is lexically bound, you get "Defining as dynamic an already
|
||||||
;; lexical var" errors in Emacs 28+).
|
;; lexical var" errors in Emacs 28+).
|
||||||
;;;###autoload (defvar projectile-project-root nil)
|
;;;###autoload (defvar projectile-project-root nil)
|
||||||
;;;###autoload (defvar projectile-enable-caching doom-interactive-p)
|
;;;###autoload (defvar projectile-enable-caching (not noninteractive))
|
||||||
;;;###autoload (defvar projectile-require-project-root 'prompt)
|
;;;###autoload (defvar projectile-require-project-root 'prompt)
|
||||||
|
|
||||||
;;;###autodef
|
;;;###autodef
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
forms
|
forms
|
||||||
`(progn
|
`(progn
|
||||||
;; doom variables
|
;; doom variables
|
||||||
(setq doom-debug-p t
|
(setq init-file-debug t
|
||||||
doom-emacs-dir ,doom-emacs-dir
|
doom-emacs-dir ,doom-emacs-dir
|
||||||
doom-cache-dir ,(expand-file-name "cache/" doom-sandbox-dir)
|
doom-cache-dir ,(expand-file-name "cache/" doom-sandbox-dir)
|
||||||
doom-etc-dir ,(expand-file-name "etc/" doom-sandbox-dir))
|
doom-etc-dir ,(expand-file-name "etc/" doom-sandbox-dir))
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
;; emacs essential variables
|
;; emacs essential variables
|
||||||
(setq before-init-time (current-time)
|
(setq before-init-time (current-time)
|
||||||
after-init-time nil
|
after-init-time nil
|
||||||
init-file-debug doom-debug-p
|
init-file-debug init-file-debug
|
||||||
noninteractive nil
|
noninteractive nil
|
||||||
process-environment (get 'process-environment 'initial-value)
|
process-environment (get 'process-environment 'initial-value)
|
||||||
exec-path (get 'exec-path 'initial-value)
|
exec-path (get 'exec-path 'initial-value)
|
||||||
|
|
|
@ -111,7 +111,7 @@ the first, fresh scratch buffer you create. This accepts:
|
||||||
(remove-hook 'doom-switch-buffer-hook #'doom-persist-scratch-buffers-after-switch-h)))
|
(remove-hook 'doom-switch-buffer-hook #'doom-persist-scratch-buffers-after-switch-h)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(when doom-interactive-p
|
(unless noninteractive
|
||||||
(add-hook 'kill-emacs-hook #'doom-persist-scratch-buffers-h))
|
(add-hook 'kill-emacs-hook #'doom-persist-scratch-buffers-h))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ one wants that.")
|
||||||
doom-autoloads-excluded-files
|
doom-autoloads-excluded-files
|
||||||
'literal)
|
'literal)
|
||||||
;; TODO Uncomment when profile system is implemented
|
;; TODO Uncomment when profile system is implemented
|
||||||
;; `((if doom-interactive-p (require 'core-start)))
|
;; `((unless noninteractive (require 'core-start)))
|
||||||
)
|
)
|
||||||
(print! (start "Byte-compiling autoloads file..."))
|
(print! (start "Byte-compiling autoloads file..."))
|
||||||
(doom-autoloads--compile-file file)
|
(doom-autoloads--compile-file file)
|
||||||
|
@ -91,7 +91,7 @@ one wants that.")
|
||||||
|
|
||||||
(defun doom-autoloads--compile-file (file)
|
(defun doom-autoloads--compile-file (file)
|
||||||
(condition-case-unless-debug e
|
(condition-case-unless-debug e
|
||||||
(let ((byte-compile-warnings (if doom-debug-p byte-compile-warnings)))
|
(let ((byte-compile-warnings (if init-file-debug byte-compile-warnings)))
|
||||||
(and (byte-compile-file file)
|
(and (byte-compile-file file)
|
||||||
(load (byte-compile-dest-file file) nil t)))
|
(load (byte-compile-dest-file file) nil t)))
|
||||||
(error
|
(error
|
||||||
|
|
|
@ -95,8 +95,7 @@ If RECOMPILE-P is non-nil, only recompile out-of-date files."
|
||||||
;; But first we must be sure that Doom and your private config have been
|
;; But first we must be sure that Doom and your private config have been
|
||||||
;; fully loaded. Which usually aren't so in an noninteractive session.
|
;; fully loaded. Which usually aren't so in an noninteractive session.
|
||||||
(let ((load-prefer-newer t)
|
(let ((load-prefer-newer t)
|
||||||
(noninteractive t)
|
(noninteractive t))
|
||||||
doom-interactive-p)
|
|
||||||
(require 'core-start)
|
(require 'core-start)
|
||||||
(quiet! (doom-initialize-packages))
|
(quiet! (doom-initialize-packages))
|
||||||
(quiet! (doom-initialize-modules))))
|
(quiet! (doom-initialize-modules))))
|
||||||
|
@ -198,7 +197,7 @@ module. This does not include your byte-compiled, third party packages.'"
|
||||||
(print-group!
|
(print-group!
|
||||||
(cl-loop with default-directory = doom-emacs-dir
|
(cl-loop with default-directory = doom-emacs-dir
|
||||||
with success = 0
|
with success = 0
|
||||||
with esc = (if doom-debug-p "" "\033[1A")
|
with esc = (if init-file-debug "" "\033[1A")
|
||||||
for path
|
for path
|
||||||
in (append (doom-glob doom-emacs-dir "*.elc")
|
in (append (doom-glob doom-emacs-dir "*.elc")
|
||||||
(doom-files-in doom-private-dir :match "\\.elc$" :depth 1)
|
(doom-files-in doom-private-dir :match "\\.elc$" :depth 1)
|
||||||
|
|
|
@ -158,8 +158,7 @@ in."
|
||||||
(print! (start "Checking Doom Emacs..."))
|
(print! (start "Checking Doom Emacs..."))
|
||||||
(condition-case-unless-debug ex
|
(condition-case-unless-debug ex
|
||||||
(print-group!
|
(print-group!
|
||||||
(let ((doom-interactive-p 'doctor)
|
(let ((noninteractive nil)
|
||||||
(noninteractive nil)
|
|
||||||
kill-emacs-query-functions
|
kill-emacs-query-functions
|
||||||
kill-emacs-hook)
|
kill-emacs-hook)
|
||||||
(defvar doom-reloading-p nil)
|
(defvar doom-reloading-p nil)
|
||||||
|
|
|
@ -86,8 +86,6 @@ Why this over exec-path-from-shell?
|
||||||
"Regenerating"
|
"Regenerating"
|
||||||
"Generating"))
|
"Generating"))
|
||||||
(print-group!
|
(print-group!
|
||||||
(when doom-interactive-p
|
|
||||||
(user-error "doom env: must be run on the command line, not an interactive session"))
|
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(insert
|
(insert
|
||||||
";; -*- mode: lisp-interaction; coding: utf-8-unix; -*-\n"
|
";; -*- mode: lisp-interaction; coding: utf-8-unix; -*-\n"
|
||||||
|
|
|
@ -133,7 +133,7 @@ list remains lean."
|
||||||
nil (mapcar (doom-rpartial #'gethash straight--repo-cache)
|
nil (mapcar (doom-rpartial #'gethash straight--repo-cache)
|
||||||
(mapcar #'symbol-name straight-recipe-repositories)))
|
(mapcar #'symbol-name straight-recipe-repositories)))
|
||||||
(recipe package type local-repo)
|
(recipe package type local-repo)
|
||||||
(let ((esc (unless doom-debug-p "\033[1A"))
|
(let ((esc (unless init-file-debug "\033[1A"))
|
||||||
(ref (straight-vc-get-commit type local-repo))
|
(ref (straight-vc-get-commit type local-repo))
|
||||||
newref output)
|
newref output)
|
||||||
(print! (start "\033[KUpdating recipes for %s...%s") package esc)
|
(print! (start "\033[KUpdating recipes for %s...%s") package esc)
|
||||||
|
@ -401,7 +401,7 @@ declaration) or dependency thereof that hasn't already been."
|
||||||
(packages-to-rebuild (make-hash-table :test 'equal))
|
(packages-to-rebuild (make-hash-table :test 'equal))
|
||||||
(repos-to-rebuild (make-hash-table :test 'equal))
|
(repos-to-rebuild (make-hash-table :test 'equal))
|
||||||
(total (length recipes))
|
(total (length recipes))
|
||||||
(esc (unless doom-debug-p "\033[1A"))
|
(esc (unless init-file-debug "\033[1A"))
|
||||||
(i 0)
|
(i 0)
|
||||||
errors)
|
errors)
|
||||||
(print! (start "Updating packages (this may take a while)..."))
|
(print! (start "Updating packages (this may take a while)..."))
|
||||||
|
@ -723,9 +723,9 @@ it doesn't make sense to slack."
|
||||||
(defadvice! doom-cli--straight-fallback-to-y-or-n-prompt-a (fn &optional prompt noprompt?)
|
(defadvice! doom-cli--straight-fallback-to-y-or-n-prompt-a (fn &optional prompt noprompt?)
|
||||||
:around #'straight-are-you-sure
|
:around #'straight-are-you-sure
|
||||||
(or noprompt?
|
(or noprompt?
|
||||||
(if doom-interactive-p
|
(if noninteractive
|
||||||
(funcall fn prompt)
|
(y-or-n-p (format! "%s" (or prompt "")))
|
||||||
(y-or-n-p (format! "%s" (or prompt ""))))))
|
(funcall fn prompt))))
|
||||||
|
|
||||||
(defun doom-cli--straight-recommended-option-p (prompt option)
|
(defun doom-cli--straight-recommended-option-p (prompt option)
|
||||||
(cl-loop for (prompt-re . opt-re) in doom-cli--straight-auto-options
|
(cl-loop for (prompt-re . opt-re) in doom-cli--straight-auto-options
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ shown."
|
||||||
(seconds (- duration (* hours 60 60) (* minutes 60)))
|
(seconds (- duration (* hours 60 60) (* minutes 60)))
|
||||||
(standard-output
|
(standard-output
|
||||||
(if (and (/= doom-cli--exit-code 0)
|
(if (and (/= doom-cli--exit-code 0)
|
||||||
(or doom-debug-p
|
(or init-file-debug
|
||||||
(eq (doom-cli-prop cli :benchmark) t)
|
(eq (doom-cli-prop cli :benchmark) t)
|
||||||
(and (eq (doom-cli-prop cli :benchmark :null) :null)
|
(and (eq (doom-cli-prop cli :benchmark :null) :null)
|
||||||
(not (doom-cli-context-pipe-p context 'out t))
|
(not (doom-cli-context-pipe-p context 'out t))
|
||||||
|
@ -1100,7 +1100,7 @@ Emacs' batch library lacks an implementation of the exec system call."
|
||||||
(insert "#!/usr/bin/env sh\n"
|
(insert "#!/usr/bin/env sh\n"
|
||||||
"trap _doomcleanup EXIT\n"
|
"trap _doomcleanup EXIT\n"
|
||||||
"_doomcleanup() {\n"
|
"_doomcleanup() {\n"
|
||||||
" rm -" (if doom-debug-p "v" "") "f "
|
" rm -" (if init-file-debug "v" "") "f "
|
||||||
(combine-and-quote-strings (delq nil (list script-file context-file)))
|
(combine-and-quote-strings (delq nil (list script-file context-file)))
|
||||||
"\n}\n"
|
"\n}\n"
|
||||||
"_doomrun() {\n " command "\n}\n"
|
"_doomrun() {\n " command "\n}\n"
|
||||||
|
@ -1195,7 +1195,7 @@ ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
||||||
(append (if doom-print-backend '("-r")) ; process ANSI codes
|
(append (if doom-print-backend '("-r")) ; process ANSI codes
|
||||||
(or (delq nil args) '("+g"))))
|
(or (delq nil args) '("+g"))))
|
||||||
(shell-quote-argument tmpfile)
|
(shell-quote-argument tmpfile)
|
||||||
(if doom-debug-p "v" "")
|
(if init-file-debug "v" "")
|
||||||
(shell-quote-argument tmpfile))
|
(shell-quote-argument tmpfile))
|
||||||
context)))))
|
context)))))
|
||||||
|
|
||||||
|
|
|
@ -484,7 +484,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
|
||||||
|
|
||||||
(use-package! dtrt-indent
|
(use-package! dtrt-indent
|
||||||
;; Automatic detection of indent settings
|
;; 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
|
;; 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'.
|
;; 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)
|
: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)
|
(memq major-mode doom-detect-indentation-excluded-modes)
|
||||||
(member (substring (buffer-name) 0 1) '(" " "*")))
|
(member (substring (buffer-name) 0 1) '(" " "*")))
|
||||||
;; Don't display messages in the echo area, but still log them
|
;; 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))))
|
(dtrt-indent-mode +1))))
|
||||||
|
|
||||||
;; Enable dtrt-indent even in smie modes so that it can update `tab-width',
|
;; Enable dtrt-indent even in smie modes so that it can update `tab-width',
|
||||||
|
|
|
@ -264,12 +264,9 @@ NAME, ARGLIST, and BODY are the same as `defun', `defun*', `defmacro', and
|
||||||
This silences calls to `message', `load', `write-region' and anything that
|
This silences calls to `message', `load', `write-region' and anything that
|
||||||
writes to `standard-output'. In interactive sessions this inhibits output to the
|
writes to `standard-output'. In interactive sessions this inhibits output to the
|
||||||
echo-area, but not to *Messages*."
|
echo-area, but not to *Messages*."
|
||||||
`(if doom-debug-p
|
`(if init-file-debug
|
||||||
(progn ,@forms)
|
(progn ,@forms)
|
||||||
,(if doom-interactive-p
|
,(if noninteractive
|
||||||
`(let ((inhibit-message t)
|
|
||||||
(save-silently t))
|
|
||||||
(prog1 ,@forms (message "")))
|
|
||||||
`(letf! ((standard-output (lambda (&rest _)))
|
`(letf! ((standard-output (lambda (&rest _)))
|
||||||
(defun message (&rest _))
|
(defun message (&rest _))
|
||||||
(defun load (file &optional noerror nomessage nosuffix must-suffix)
|
(defun load (file &optional noerror nomessage nosuffix must-suffix)
|
||||||
|
@ -277,7 +274,10 @@ echo-area, but not to *Messages*."
|
||||||
(defun write-region (start end filename &optional append visit lockname mustbenew)
|
(defun write-region (start end filename &optional append visit lockname mustbenew)
|
||||||
(unless visit (setq visit 'no-message))
|
(unless visit (setq visit 'no-message))
|
||||||
(funcall write-region start end filename append visit lockname mustbenew)))
|
(funcall write-region start end filename append visit lockname mustbenew)))
|
||||||
,@forms))))
|
,@forms)
|
||||||
|
`(let ((inhibit-message t)
|
||||||
|
(save-silently t))
|
||||||
|
(prog1 ,@forms (message ""))))))
|
||||||
|
|
||||||
(defmacro eval-if! (cond then &rest body)
|
(defmacro eval-if! (cond then &rest body)
|
||||||
"Expands to THEN if COND is non-nil, to BODY otherwise.
|
"Expands to THEN if COND is non-nil, to BODY otherwise.
|
||||||
|
|
|
@ -66,7 +66,7 @@ syntax-checker modules obsolete. e.g. If :feature version-control is found in
|
||||||
your `doom!' block, a warning is emitted before replacing it with :emacs vc and
|
your `doom!' block, a warning is emitted before replacing it with :emacs vc and
|
||||||
:ui vc-gutter.")
|
:ui vc-gutter.")
|
||||||
|
|
||||||
(defvar doom-inhibit-module-warnings doom-interactive-p
|
(defvar doom-inhibit-module-warnings (not noninteractive)
|
||||||
"If non-nil, don't emit deprecated or missing module warnings at startup.")
|
"If non-nil, don't emit deprecated or missing module warnings at startup.")
|
||||||
|
|
||||||
;;; Custom hooks
|
;;; Custom hooks
|
||||||
|
@ -309,7 +309,7 @@ those directories. The first returned path is always `doom-private-dir'."
|
||||||
:flags (if (listp m) (cdr m))
|
:flags (if (listp m) (cdr m))
|
||||||
:path (if (stringp path) (file-truename path)))
|
:path (if (stringp path) (file-truename path)))
|
||||||
results)))))))
|
results)))))))
|
||||||
(unless doom-interactive-p
|
(when noninteractive
|
||||||
(setq doom-inhibit-module-warnings t))
|
(setq doom-inhibit-module-warnings t))
|
||||||
(nreverse results)))
|
(nreverse results)))
|
||||||
|
|
||||||
|
@ -328,10 +328,10 @@ This value is cached. If REFRESH-P, then don't use the cached value."
|
||||||
|
|
||||||
(autoload 'use-package "use-package-core" nil nil t)
|
(autoload 'use-package "use-package-core" nil nil t)
|
||||||
|
|
||||||
(setq use-package-compute-statistics doom-debug-p
|
(setq use-package-compute-statistics init-file-debug
|
||||||
use-package-verbose doom-debug-p
|
use-package-verbose init-file-debug
|
||||||
use-package-minimum-reported-time (if doom-debug-p 0 0.1)
|
use-package-minimum-reported-time (if init-file-debug 0 0.1)
|
||||||
use-package-expand-minimally doom-interactive-p)
|
use-package-expand-minimally (not noninteractive))
|
||||||
|
|
||||||
;; A common mistake for new users is that they inadvertently install their
|
;; A common mistake for new users is that they inadvertently install their
|
||||||
;; packages with package.el, by copying over old `use-package' declarations with
|
;; packages with package.el, by copying over old `use-package' declarations with
|
||||||
|
@ -474,7 +474,7 @@ The overall load order of Doom is as follows:
|
||||||
Module load order is determined by your `doom!' block. See `doom-modules-dirs'
|
Module load order is determined by your `doom!' block. See `doom-modules-dirs'
|
||||||
for a list of all recognized module trees. Order defines precedence (from most
|
for a list of all recognized module trees. Order defines precedence (from most
|
||||||
to least)."
|
to least)."
|
||||||
`(unless doom-interactive-p
|
`(when noninteractive
|
||||||
(doom-module-mplist-map
|
(doom-module-mplist-map
|
||||||
(lambda (category module &rest plist)
|
(lambda (category module &rest plist)
|
||||||
(if (plist-member plist :path)
|
(if (plist-member plist :path)
|
||||||
|
|
|
@ -120,7 +120,7 @@ uses a straight or package.el command directly).")
|
||||||
"://github.com/"
|
"://github.com/"
|
||||||
(or (plist-get recipe :repo) "radian-software/straight.el")))
|
(or (plist-get recipe :repo) "radian-software/straight.el")))
|
||||||
(branch (or (plist-get recipe :branch) straight-repository-branch))
|
(branch (or (plist-get recipe :branch) straight-repository-branch))
|
||||||
(call (if doom-debug-p
|
(call (if init-file-debug
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(print! "%s" (cdr (apply #'doom-call-process args))))
|
(print! "%s" (cdr (apply #'doom-call-process args))))
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
|
|
|
@ -30,7 +30,7 @@ debian, and derivatives). On most it's 'fd'.")
|
||||||
;; Auto-discovery is slow to do by default. Better to update the list
|
;; Auto-discovery is slow to do by default. Better to update the list
|
||||||
;; when you need to (`projectile-discover-projects-in-search-path').
|
;; when you need to (`projectile-discover-projects-in-search-path').
|
||||||
projectile-auto-discover nil
|
projectile-auto-discover nil
|
||||||
projectile-enable-caching doom-interactive-p
|
projectile-enable-caching (not noninteractive)
|
||||||
projectile-globally-ignored-files '(".DS_Store" "TAGS")
|
projectile-globally-ignored-files '(".DS_Store" "TAGS")
|
||||||
projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o")
|
projectile-globally-ignored-file-suffixes '(".elc" ".pyc" ".o")
|
||||||
projectile-kill-buffers-filter 'kill-only-files
|
projectile-kill-buffers-filter 'kill-only-files
|
||||||
|
@ -115,8 +115,7 @@ b) represent blacklisted directories that are too big, change too often or are
|
||||||
private. (see `doom-projectile-cache-blacklist'),
|
private. (see `doom-projectile-cache-blacklist'),
|
||||||
c) are not valid projectile projects."
|
c) are not valid projectile projects."
|
||||||
(when (and (bound-and-true-p projectile-projects-cache)
|
(when (and (bound-and-true-p projectile-projects-cache)
|
||||||
projectile-enable-caching
|
projectile-enable-caching)
|
||||||
doom-interactive-p)
|
|
||||||
(setq projectile-known-projects
|
(setq projectile-known-projects
|
||||||
(cl-remove-if #'projectile-ignored-project-p
|
(cl-remove-if #'projectile-ignored-project-p
|
||||||
projectile-known-projects))
|
projectile-known-projects))
|
||||||
|
|
12
core/core.el
12
core/core.el
|
@ -115,18 +115,6 @@
|
||||||
(defconst doom-modules-version "22.06.0-dev"
|
(defconst doom-modules-version "22.06.0-dev"
|
||||||
"Current version of Doom Emacs.")
|
"Current version of Doom Emacs.")
|
||||||
|
|
||||||
(defvar doom-debug-p (or (getenv-internal "DEBUG") init-file-debug)
|
|
||||||
"If non-nil, Doom will log more.
|
|
||||||
|
|
||||||
Use `doom-debug-mode' to toggle it. The --debug-init flag and setting the DEBUG
|
|
||||||
envvar will enable this at startup.")
|
|
||||||
|
|
||||||
(defvar doom-init-p nil
|
|
||||||
"Non-nil if Doom has been initialized.")
|
|
||||||
|
|
||||||
(defconst doom-interactive-p (not noninteractive)
|
|
||||||
"If non-nil, Emacs is in interactive mode.")
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Directory variables
|
;;; Directory variables
|
||||||
|
|
|
@ -69,8 +69,6 @@
|
||||||
"--eval"
|
"--eval"
|
||||||
(prin1-to-string
|
(prin1-to-string
|
||||||
`(progn
|
`(progn
|
||||||
(defvar doom-interactive-p nil)
|
|
||||||
(defvar doom-debug-p ,doom-debug-p)
|
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(require 'subr-x)
|
(require 'subr-x)
|
||||||
(load ,(doom-path doom-core-dir "autoload/print"))
|
(load ,(doom-path doom-core-dir "autoload/print"))
|
||||||
|
@ -111,10 +109,10 @@
|
||||||
(defun +literate-tangle-h ()
|
(defun +literate-tangle-h ()
|
||||||
"Tangles `+literate-config-file' if it has changed.
|
"Tangles `+literate-config-file' if it has changed.
|
||||||
This is performed with an asyncronous Emacs process, except when
|
This is performed with an asyncronous Emacs process, except when
|
||||||
`doom-interactive-p' is non-nil."
|
`noninteractive' is nil."
|
||||||
(if doom-interactive-p
|
(if noninteractive
|
||||||
(+literate-tangle--async)
|
(+literate-tangle--sync)
|
||||||
(+literate-tangle--sync)))
|
(+literate-tangle--async)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +literate-tangle-check-finished-h ()
|
(defun +literate-tangle-check-finished-h ()
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
;; disable modules, and to reduce the effort required to maintain our copy of
|
;; 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).
|
;; `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)
|
(not doom-reloading-p)
|
||||||
(featurep! +everywhere))
|
(featurep! +everywhere))
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
;; Reduce verbosity. 3 is too chatty about initializing yasnippet. 2 is just
|
;; Reduce verbosity. 3 is too chatty about initializing yasnippet. 2 is just
|
||||||
;; right (only shows errors).
|
;; 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
|
;; default snippets library, if available
|
||||||
(add-to-list 'load-path +snippets-dir)
|
(add-to-list 'load-path +snippets-dir)
|
||||||
|
|
|
@ -197,7 +197,7 @@ Dictionary.app behind the scenes to get definitions.")
|
||||||
:init
|
:init
|
||||||
(add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn)
|
(add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn)
|
||||||
:config
|
: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-docsets-path (concat doom-etc-dir "docsets/")
|
||||||
dash-docs-min-length 2
|
dash-docs-min-length 2
|
||||||
dash-docs-browser-func #'eww)
|
dash-docs-browser-func #'eww)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue