]> git.eshelyaron.com Git - emacs.git/commit
Don't discard customizations in progress when adding comments (Bug#5358)
authorMauro Aranda <maurooaranda@gmail.com>
Fri, 27 Sep 2019 16:06:36 +0000 (18:06 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 27 Sep 2019 16:06:36 +0000 (18:06 +0200)
commit283fd5f2f6f3fa1f650c5a77f9e3587faddd6881
treebbb25ef172b502812844b6a01061f8b56491f8a2
parent9ba907a5fbafaa323402ec1cfe4239ebf87a8a0a
Don't discard customizations in progress when adding comments (Bug#5358)

* 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.
lisp/cus-edit.el
test/lisp/custom-tests.el