* test/lisp/custom-tests.el (custom--test-theme-variables): "make
check" in the main directory didn't work because the path was
wrong. Use EMACS_TEST_DIRECTORY to find the test directory
instead.
* 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/cus-edit.el (custom-comment-show): Add docstring. Save the
widget value in the :shown-value property, before redrawing.
(custom-variable-modified-p): New function, to complement the return
values of custom-variable-state.
(custom-variable-state-set): Use it.
(custom-face-value-create): Add children to the custom-face widget
before setting the state, to be able to check for user edits.
(custom-face-state-set): Check for user edits before calling
custom-face-state (bug#5358).
* test/lisp/custom-tests.el
(custom-test-show-comment-preserves-changes): New test.
* test/lisp/custom-tests.el (custom--test-user-option)
(custom--test-variable): New variables.
(custom--test-theme-variables): New test.
* test/lisp/custom-resources/custom--test-theme.el (custom--test):
New file.
Update some other copyright years automatically, by running:
Run 'UPDATE_COPYRIGHT_YEAR=2019 \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 admin/update-copyright'
followed by 'admin/merge-gnulib'.
For discussion, see thread starting at
https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00222.html.
* lisp/custom.el: (custom-available-themes): Use directory-files
instead of performing arbitrary wildcard expansion in file names.
(custom-theme--load-path): Document return value.
* test/lisp/custom-tests.el: New file.
(custom-theme--load-path): New test.