fix(lib): avoid writing customized faces to custom.el (take 2)

Setting custom--inhibit-theme-enable to t isn't enough, since
custom--should-apply-setting will return non-nil if THEME is 'user.

Ref: #7929
Amend: 68771150ba
This commit is contained in:
Henrik Lissner 2024-07-10 04:21:19 -04:00
parent 234cc27b77
commit 0b13525252
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -6,11 +6,11 @@
(add-hook! 'doom-load-theme-hook
(defun doom-apply-customized-faces-h ()
"Run `doom-customize-theme-hook'."
(letf! (defun custom-push-theme (prop symbol theme mode &optional value)
(funcall custom-push-theme prop symbol theme mode value)
(if (facep symbol) (face-spec-set symbol value t)))
(let ((custom--inhibit-theme-enable t))
(run-hooks 'doom-customize-theme-hook)))))
(letf! ((#'custom--should-apply-setting #'ignore)
(defun custom-push-theme (prop symbol theme mode &optional value)
(funcall custom-push-theme prop symbol theme mode value)
(if (facep symbol) (face-spec-set symbol value t))))
(run-hooks 'doom-customize-theme-hook))))
(defun doom--normalize-face-spec (spec)
(cond ((listp (car spec))