aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cus-edit.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 0ca3f1ede85..d3d17fda7ad 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3035,17 +3035,18 @@ Update the widget to show that value. The value that was current
3035before this operation becomes the backup value." 3035before this operation becomes the backup value."
3036 (let* ((symbol (widget-value widget)) 3036 (let* ((symbol (widget-value widget))
3037 (saved-value (get symbol 'saved-value)) 3037 (saved-value (get symbol 'saved-value))
3038 (comment (get symbol 'saved-variable-comment))) 3038 (comment (get symbol 'saved-variable-comment))
3039 value)
3039 (custom-variable-backup-value widget) 3040 (custom-variable-backup-value widget)
3040 (if (not (or saved-value comment)) 3041 (if (not (or saved-value comment))
3041 ;; If there is no saved value, remove the setting. 3042 ;; If there is no saved value, remove the setting.
3042 (custom-push-theme 'theme-value symbol 'user 'reset) 3043 (custom-push-theme 'theme-value symbol 'user 'reset)
3043 ;; Otherwise, apply the saved value. 3044 (setq value (car-safe saved-value))
3044 (put symbol 'variable-comment comment) 3045 (custom-push-theme 'theme-value symbol 'user 'set value)
3045 (custom-push-theme 'theme-value symbol 'user 'set (car-safe saved-value)) 3046 (put symbol 'variable-comment comment))
3046 (ignore-errors 3047 (ignore-errors
3047 (funcall (or (get symbol 'custom-set) 'set-default) 3048 (funcall (or (get symbol 'custom-set) #'set-default) symbol
3048 symbol (eval (car saved-value))))) 3049 (eval (or value (car (get symbol 'standard-value))))))
3049 (put symbol 'customized-value nil) 3050 (put symbol 'customized-value nil)
3050 (put symbol 'customized-variable-comment nil) 3051 (put symbol 'customized-variable-comment nil)
3051 (widget-put widget :custom-state 'unknown) 3052 (widget-put widget :custom-state 'unknown)