From 01819490b6964b2f60782e4b836c60f5cce58d84 Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Thu, 27 Aug 2020 16:22:35 +0200 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 db7f6a056d4..7581457ce8d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -758,6 +758,9 @@ Return non-nil if the `customized-value' property actually changed." (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.39.2