mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Apply non-user themes only when asked
Theme settings now generally aren't actually applied until a call to `enable-theme-, either one made explicitly or implicitly through `load-theme' with NO-ENABLE nil. This change has the effect of not applying theme changes just because we load a lisp file containing a theme specification. The previous behavior is preserved for the special case of the `user' theme, which is frequently used for ad-hoc customization. * lisp/cus-face.el (custom-theme-set-faces): Call `custom--should-apply-setting' to decide whether to apply a setting. * lisp/custom.el (custom--should-apply-setting): New function. (custom--inhibit-theme-enable): Add `apply-only-user' option; default to it. (custom-push-theme, custom-theme-set-variables): Call `custom--should-apply-setting' to decide whether to apply a setting.
This commit is contained in:
parent
6021e1db92
commit
aabaa9f8c8
3 changed files with 21 additions and 5 deletions
|
|
@ -342,7 +342,7 @@ argument list."
|
|||
;; is aliased to.
|
||||
(if (get face 'face-alias)
|
||||
(setq face (get face 'face-alias)))
|
||||
(if custom--inhibit-theme-enable
|
||||
(if (custom--should-apply-setting theme)
|
||||
;; Just update theme settings.
|
||||
(custom-push-theme 'theme-face face theme 'set spec)
|
||||
;; Update theme settings and set the face spec.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue