Minor refactors & comment revision
This commit is contained in:
parent
646cba3f68
commit
7443669b1e
5 changed files with 16 additions and 14 deletions
|
@ -106,7 +106,7 @@ order of `doom-env-switches' determines priority."
|
|||
"# that `doom env refresh` is executed. Alternatively, create your own env file\n"
|
||||
"# in your DOOMDIR and load that with `(load-env-vars FILE)`.\n"
|
||||
"#\n"
|
||||
"# To auto-regenerate this file when `doom reload` is run, use `doom env enable'\n"
|
||||
"# To auto-regenerate this file when `doom reload` is run, use `doom env auto'\n"
|
||||
"# or set DOOMENV=1 in your shell environment/config.\n"
|
||||
"# ---------------------------------------------------------------------------\n\n"))
|
||||
(let ((env-point (point)))
|
||||
|
|
|
@ -50,15 +50,16 @@ This is used by `associate!', `file-exists-p!' and `project-file-exists-p!'."
|
|||
(defun doom--resolve-hook-forms (hooks)
|
||||
"Converts a list of modes into a list of hook symbols.
|
||||
|
||||
If a mode is quoted, it is left as is."
|
||||
If a mode is quoted, it is left as is. If the entire HOOKS list is quoted, the
|
||||
list is returned as-is."
|
||||
(declare (pure t) (side-effect-free t))
|
||||
(cl-loop with quoted-p = (eq (car-safe hooks) 'quote)
|
||||
for hook in (doom-enlist (doom-unquote hooks))
|
||||
(let ((hook-list (doom-enlist (doom-unquote hooks))))
|
||||
(if (eq (car-safe hooks) 'quote)
|
||||
hook-list
|
||||
(cl-loop for hook in hook-list
|
||||
if (eq (car-safe hook) 'quote)
|
||||
collect (cadr hook)
|
||||
else if quoted-p
|
||||
collect hook
|
||||
else collect (intern (format "%s-hook" (symbol-name hook)))))
|
||||
else collect (intern (format "%s-hook" (symbol-name hook)))))))
|
||||
|
||||
(defun doom--assert-stage-p (stage macro)
|
||||
(unless (bound-and-true-p byte-compile-current-file)
|
||||
|
|
|
@ -98,9 +98,9 @@ c) are not valid projectile projects."
|
|||
(advice-add #'projectile-locate-dominating-file :around #'doom*projectile-locate-dominating-file)
|
||||
|
||||
(cond
|
||||
;; If fd exists, use it for git and generic projects fd is a rust program
|
||||
;; that is significantly faster. It also respects .gitignore. This is
|
||||
;; recommended in the projectile docs
|
||||
;; If fd exists, use it for git and generic projects. fd is a rust program
|
||||
;; that is significantly faster and respects .gitignore. This is recommended
|
||||
;; in the projectile docs
|
||||
((executable-find doom-projectile-fd-binary)
|
||||
(setq projectile-git-command (concat
|
||||
doom-projectile-fd-binary
|
||||
|
|
|
@ -504,7 +504,8 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
|
|||
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
||||
;; Apply `doom-font' et co
|
||||
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
||||
;; Setup `doom-load-theme-hook'
|
||||
;; Setup `doom-load-theme-hook' and ensure `doom-theme' is always set to the
|
||||
;; currently loaded theme
|
||||
(advice-add #'load-theme :after #'doom*run-load-theme-hooks)
|
||||
|
||||
(add-hook 'window-setup-hook #'doom|init-ui)
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
(defun +indent-guides|disable-maybe ()
|
||||
(when highlight-indent-guides-mode
|
||||
(highlight-indent-guides-mode -1)))
|
||||
;; `highlight-indent-guides' breaks in `visual-line-mode'
|
||||
;; `highlight-indent-guides' breaks in these modes
|
||||
(add-hook 'visual-line-mode-hook #'+indent-guides|disable-maybe)
|
||||
(add-hook 'org-indent-mode-hook #'+indent-guides|disable-maybe))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue