Fix custom-set-*-faces! macros in Emacs 27
custom--inhibit-theme-enable is non-nil by default in Emacs 27, which inhibits uses of `custom-theme-set-faces` when modifying any theme other than 'user.
This commit is contained in:
parent
4351474bf3
commit
e7019e4163
1 changed files with 7 additions and 6 deletions
|
@ -19,12 +19,13 @@ all themes. It will apply to all themes once they are loaded."
|
||||||
`(let ((fn (gensym "doom--customize-themes-h-")))
|
`(let ((fn (gensym "doom--customize-themes-h-")))
|
||||||
(fset
|
(fset
|
||||||
fn (lambda ()
|
fn (lambda ()
|
||||||
(dolist (theme (doom-enlist (or ,theme 'user)))
|
(let (custom--inhibit-theme-enable)
|
||||||
(when (or (eq theme 'user)
|
(dolist (theme (doom-enlist (or ,theme 'user)))
|
||||||
(custom-theme-enabled-p theme))
|
(when (or (eq theme 'user)
|
||||||
(apply #'custom-theme-set-faces theme
|
(custom-theme-enabled-p theme))
|
||||||
(mapcan #'doom--custom-theme-set-face
|
(apply #'custom-theme-set-faces theme
|
||||||
(list ,@specs)))))))
|
(mapcan #'doom--custom-theme-set-face
|
||||||
|
(list ,@specs))))))))
|
||||||
(when (or doom-init-theme-p (null doom-theme))
|
(when (or doom-init-theme-p (null doom-theme))
|
||||||
(funcall fn))
|
(funcall fn))
|
||||||
(add-hook 'doom-load-theme-hook fn 'append)))
|
(add-hook 'doom-load-theme-hook fn 'append)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue