Fix mixed-pitch affecting all buffers

Both solaire-mode and mixed-pitch-mode use face-remap to do their thang.
We ensure the order by ensuring activation order.
This commit is contained in:
Henrik Lissner 2019-02-12 00:26:43 -05:00
parent fb8a378d72
commit c033bfaca2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -73,4 +73,13 @@
(add-hook! '(minibuffer-setup-hook window-configuration-change-hook)
#'+doom|disable-fringes-in-minibuffer)
(solaire-global-mode +1))
(solaire-global-mode +1)
;; Fix incompatibility with the mixed-pitch package which causes all buffers
;; to be affected (by `mixed-pitch-mode')
(defun +doom*fix-mixed-pitch-mode (&optional arg)
(when (and mixed-pitch-mode (not arg))
(mixed-pitch-mode -1))
(solaire-mode -1)
(turn-on-solaire-mode))
(advice-add #'mixed-pitch-mode :before #'+doom*fix-mixed-pitch-mode))