From: Mauro Aranda Date: Thu, 27 Aug 2020 14:22:35 +0000 (+0200) Subject: Keep the user theme in sync when marking a variable as set X-Git-Tag: emacs-28.0.90~6354 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=01819490b6964b2f60782e4b836c60f5cce58d84;p=emacs.git 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). --- 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)))))