From a6ba70aed796688e35e7eec7c4df7a16e59ecebd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 11 Jul 2024 03:10:29 -0400 Subject: [PATCH] fix(lib): avoid writing customized faces to custom.el (take 4) This time, the faces weren't being applied if THEME == 'user (for `custom-set-faces!`). Amend: afb9773d7c14 Ref: #7929 Ref: #7933 --- lisp/lib/themes.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/lib/themes.el b/lisp/lib/themes.el index c4e35f8d3..8d681162b 100644 --- a/lisp/lib/themes.el +++ b/lisp/lib/themes.el @@ -6,11 +6,11 @@ ;;;###autoload (defun doom--run-customize-theme-hook (fn) "Run FN, but suppress any writes to `custom-file'." - (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)))) - (funcall fn))) + (letf! (defun put (symbol prop value) + (unless (string-prefix-p "saved-" (symbol-name prop)) + (funcall put symbol prop value))) + (let (custom--inhibit-theme-enable) + (funcall fn)))) (add-hook! 'doom-load-theme-hook (defun doom-apply-customized-faces-h ()