Fix incorrect variable reference (-mode not -hook)

This commit is contained in:
TEC 2021-05-28 16:08:57 +08:00
parent 7fd938b708
commit e38c3e25db
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 4 additions and 4 deletions

View File

@ -2299,11 +2299,11 @@ runs after UI initialisation and both
(defvar mixed-pitch-modes '(org-mode LaTeX-mode markdown-mode gfm-mode Info-mode)
"Modes that `mixed-pitch-mode' should be enabled in, but only after UI initialisation.")
(defun init-mixed-pitch-h ()
"Hook `mixed-pitch-mode' into each mode in `mixed-pitch-hooks'.
Also immediately enables `mixed-pitch-hooks' if currently in one of the modes."
(when (memq major-mode mixed-pitch-hooks)
"Hook `mixed-pitch-mode' into each mode in `mixed-pitch-modes'.
Also immediately enables `mixed-pitch-modes' if currently in one of the modes."
(when (memq major-mode mixed-pitch-modes)
(mixed-pitch-mode 1))
(dolist (hook mixed-pitch-hooks)
(dolist (hook mixed-pitch-modes)
(add-hook (intern (concat (symbol-name hook) "-hook")) #'mixed-pitch-mode)))
(add-hook 'doom-init-ui-hook #'init-mixed-pitch-h)
#+end_src