aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Aranda2020-11-01 10:10:08 -0300
committerMauro Aranda2020-11-01 10:10:08 -0300
commitecec9a259b13d88fa23dde078fba99ae78ef79c7 (patch)
treeee58c55fe73a76522193a7681c36d465effc12f7
parent43a1b79f56cb1ac6530e8b41f3c329890a00a8f6 (diff)
downloademacs-ecec9a259b13d88fa23dde078fba99ae78ef79c7.tar.gz
emacs-ecec9a259b13d88fa23dde078fba99ae78ef79c7.zip
Fix saving a face setting with Customize
* lisp/cus-edit.el (custom-face-save): Make sure we back up into the :shown-value property what the user has edited so far, if we are going to recreate the custom-face widget. (Bug#44331)
-rw-r--r--lisp/cus-edit.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 769a69a50f2..3eef4468394 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3931,7 +3931,12 @@ Optional EVENT is the location for the menu."
3931 (custom-face-mark-to-save widget) 3931 (custom-face-mark-to-save widget)
3932 ;; The user is working on only a selected terminal type; 3932 ;; The user is working on only a selected terminal type;
3933 ;; make sure we save the entire spec to `custom-file'. (Bug #40866) 3933 ;; make sure we save the entire spec to `custom-file'. (Bug #40866)
3934 ;; If recreating a widget that may have been edited by the user, remember
3935 ;; to always save the edited value into the :shown-value property, so
3936 ;; we use that value for the recreated widget. (Bug#44331)
3937 (widget-put widget :shown-value (custom-face-widget-to-spec widget))
3934 (custom-face-edit-all widget) 3938 (custom-face-edit-all widget)
3939 (widget-put widget :shown-value nil) ; Reset it after we used it.
3935 (custom-face-mark-to-save widget) 3940 (custom-face-mark-to-save widget)
3936 (if (eq form 'selected) 3941 (if (eq form 'selected)
3937 (custom-face-edit-selected widget) 3942 (custom-face-edit-selected widget)