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"
|
"# 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"
|
"# in your DOOMDIR and load that with `(load-env-vars FILE)`.\n"
|
||||||
"#\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"
|
"# or set DOOMENV=1 in your shell environment/config.\n"
|
||||||
"# ---------------------------------------------------------------------------\n\n"))
|
"# ---------------------------------------------------------------------------\n\n"))
|
||||||
(let ((env-point (point)))
|
(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)
|
(defun doom--resolve-hook-forms (hooks)
|
||||||
"Converts a list of modes into a list of hook symbols.
|
"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))
|
(declare (pure t) (side-effect-free t))
|
||||||
(cl-loop with quoted-p = (eq (car-safe hooks) 'quote)
|
(let ((hook-list (doom-enlist (doom-unquote hooks))))
|
||||||
for hook in (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)
|
if (eq (car-safe hook) 'quote)
|
||||||
collect (cadr hook)
|
collect (cadr hook)
|
||||||
else if quoted-p
|
else collect (intern (format "%s-hook" (symbol-name hook)))))))
|
||||||
collect hook
|
|
||||||
else collect (intern (format "%s-hook" (symbol-name hook)))))
|
|
||||||
|
|
||||||
(defun doom--assert-stage-p (stage macro)
|
(defun doom--assert-stage-p (stage macro)
|
||||||
(unless (bound-and-true-p byte-compile-current-file)
|
(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)
|
(advice-add #'projectile-locate-dominating-file :around #'doom*projectile-locate-dominating-file)
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
;; If fd exists, use it for git and generic projects fd is a rust program
|
;; 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
|
;; that is significantly faster and respects .gitignore. This is recommended
|
||||||
;; recommended in the projectile docs
|
;; in the projectile docs
|
||||||
((executable-find doom-projectile-fd-binary)
|
((executable-find doom-projectile-fd-binary)
|
||||||
(setq projectile-git-command (concat
|
(setq projectile-git-command (concat
|
||||||
doom-projectile-fd-binary
|
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))
|
(add-hook 'doom-init-ui-hook #'doom|init-theme))
|
||||||
;; Apply `doom-font' et co
|
;; Apply `doom-font' et co
|
||||||
(add-hook 'doom-after-init-modules-hook #'doom|init-fonts)
|
(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)
|
(advice-add #'load-theme :after #'doom*run-load-theme-hooks)
|
||||||
|
|
||||||
(add-hook 'window-setup-hook #'doom|init-ui)
|
(add-hook 'window-setup-hook #'doom|init-ui)
|
||||||
|
|
|
@ -14,6 +14,6 @@
|
||||||
(defun +indent-guides|disable-maybe ()
|
(defun +indent-guides|disable-maybe ()
|
||||||
(when highlight-indent-guides-mode
|
(when highlight-indent-guides-mode
|
||||||
(highlight-indent-guides-mode -1)))
|
(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 'visual-line-mode-hook #'+indent-guides|disable-maybe)
|
||||||
(add-hook 'org-indent-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