From e003b24ad69d0dce4916b32e6c5c36c2745b24ae Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Sat, 7 Oct 2023 11:57:18 -0300 Subject: [PATCH] Fix saving faces with attributes that need filtering * lisp/cus-edit.el (custom-face-save): The :shown-value property for the custom-face widget is supposed to be a value suitable for the customization widget. (Bug#66391) --- lisp/cus-edit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 1021707907d..706e08d5657 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4148,7 +4148,10 @@ custom-face-save ;; If recreating a widget that may have been edited by the user, remember ;; to always save the edited value into the :shown-value property, so ;; we use that value for the recreated widget. (Bug#44331) - (widget-put widget :shown-value (custom-face-widget-to-spec widget)) + (let ((child (car (widget-get widget :children)))) + (if (eq (widget-type child) 'custom-face-edit) + (widget-put widget :shown-value `((t ,(widget-value child)))) + (widget-put widget :shown-value (widget-value child)))) (custom-face-edit-all widget) (widget-put widget :shown-value nil) ; Reset it after we used it. (custom-face-mark-to-save widget) -- 2.34.1