From b53149c821cbeb836b68f1e0c12c09e8226dbd1f Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Mon, 24 Aug 2020 09:24:28 -0300 Subject: [PATCH] Keep the user theme in sync when marking a variable as set * lisp/custom.el (customize-mark-as-set): Keep the user theme in sync even if the new value of the variable is the saved-value or the standard-value. If we don't do this, custom themes might end up stepping over the user preferences in a session. (Bug#28904) --- lisp/custom.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/custom.el b/lisp/custom.el index db7f6a056d..7581457ce8 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -758,6 +758,9 @@ customize-mark-as-set (progn (put symbol 'customized-value (list (custom-quote value))) (custom-push-theme 'theme-value symbol 'user 'set (custom-quote value))) + (custom-push-theme 'theme-value symbol 'user + (if (get symbol 'saved-value) 'set 'reset) + (custom-quote value)) (put symbol 'customized-value nil)) ;; Changed? (not (equal customized (get symbol 'customized-value))))) -- 2.28.0