]> git.eshelyaron.com Git - emacs.git/commit
Preserve user customizations after disabling a theme
authorMauro Aranda <maurooaranda@gmail.com>
Sat, 5 Sep 2020 11:53:18 +0000 (13:53 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 5 Sep 2020 11:53:18 +0000 (13:53 +0200)
commit31c3f53816feb4c40c52cf2840c171a9d631de66
tree8ae7e6ff2653db2342906e0bde98561da759ba86
parent22570d18bab6614ea21ea4fd9156eeb684194f6e
Preserve user customizations after disabling a theme

* lisp/custom.el (enable-theme): Since we are enabling the theme, bind
custom--inhibit-theme-enable to nil.  Then rely on custom-push-theme
to do the right thing with the theme settings and prior user settings,
instead of manipulating the property here.  This way, when disabling a
theme, we restore user preferences, even when the values were changed
outside of customize.
(disable-theme): Call custom-push-theme instead of handling theme
settings directly.
(custom-push-theme): Avoid another instance of Bug#28904: we don't
need the changed theme when the value recorded for it is going to be
the same as the recorded for the user theme.

* test/lisp/custom-tests.el (custom--test-theme-variables): Get rid of
a portion of the test that will always fail, because the user theme
has priority over every other theme.  Expect the test to pass now that
we preserve user customizations after disabling a theme (bug#34027).
lisp/custom.el
test/lisp/custom-tests.el