]> git.eshelyaron.com Git - emacs.git/commit
Apply non-user themes only when asked
authorDaniel Colascione <dancol@dancol.org>
Sat, 16 Jun 2018 22:42:56 +0000 (15:42 -0700)
committerDaniel Colascione <dancol@dancol.org>
Sat, 16 Jun 2018 22:44:23 +0000 (15:44 -0700)
commitaabaa9f8c8b79df44887392fcaa199e17b016afd
tree7c7f15543866bad5acaa5ca9ce49877bfb5740fb
parent6021e1db92e355fbf5c66765fb0bc4658a80180a
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.
etc/NEWS
lisp/cus-face.el
lisp/custom.el