# HG changeset patch # User Chong Yidong # Date 1135406716 0 # Node ID 1c774eee2980441ec176e800ffbc0b54d90dbea4 # Parent 32dce3f26e2154b405e9d7122226c774b3423fc6 * cus-edit.el (custom-variable-set, custom-variable-set) (custom-variable-reset-saved, custom-variable-reset-backup) (custom-face-set, custom-face-reset-saved): Update `user' theme. (custom-variable-save): Fix typos. (custom-variable-state-set, custom-face-state-set): Check theme-value. (custom-variable-reset-standard, custom-face-reset-standard): Perform custom theme recalc unconditionally. diff -r 32dce3f26e21 -r 1c774eee2980 lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 24 04:05:13 2005 +0000 +++ b/lisp/ChangeLog Sat Dec 24 06:45:16 2005 +0000 @@ -9,10 +9,14 @@ (custom-themed): New face. (custom-magic-alist): New value, THEMED, for theme settings. (custom-variable-state-set, custom-face-state-set): Check - theme-value. + theme-value instead of saved-value. (custom-variable-reset-standard, custom-face-reset-standard): Remove theme setting entirely. Recalculate new values. - + (custom-variable-set, custom-variable-set) + (custom-variable-reset-saved, custom-variable-reset-backup) + (custom-face-set, custom-face-reset-saved): Update `user' theme. + (custom-variable-save): Fix typos. + 2005-12-23 Juri Linkov * emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms): diff -r 32dce3f26e21 -r 1c774eee2980 lisp/cus-edit.el --- a/lisp/cus-edit.el Sat Dec 24 04:05:13 2005 +0000 +++ b/lisp/cus-edit.el Sat Dec 24 06:45:16 2005 +0000 @@ -2545,12 +2545,15 @@ (error nil)) 'set 'changed)) - ((progn (setq tmp (get symbol 'saved-value)) + ((progn (setq tmp (get symbol 'theme-value)) (setq temp (get symbol 'saved-variable-comment)) (or tmp temp)) (if (condition-case nil - (and (equal value (eval (car tmp))) - (equal comment temp)) + (and (equal comment temp) + (equal value + (eval (car + (custom-theme-value + (caar tmp) tmp))))) (error nil)) (cond ((eq 'user (caar (get symbol 'theme-value))) @@ -2666,6 +2669,8 @@ ;; Make the comment invisible by hand if it's empty (custom-comment-hide comment-widget)) (custom-variable-backup-value widget) + (custom-push-theme 'theme-value symbol 'user + 'set (widget-value child)) (funcall set symbol (eval (setq val (widget-value child)))) (put symbol 'customized-value (list val)) (put symbol 'variable-comment comment) @@ -2676,6 +2681,8 @@ ;; Make the comment invisible by hand if it's empty (custom-comment-hide comment-widget)) (custom-variable-backup-value widget) + (custom-push-theme 'theme-value symbol 'user + 'set (widget-value child)) (funcall set symbol (setq val (widget-value child))) (put symbol 'customized-value (list (custom-quote val))) (put symbol 'variable-comment comment) @@ -2705,7 +2712,7 @@ (custom-comment-hide comment-widget)) (put symbol 'saved-value (list (widget-value child))) (custom-push-theme 'theme-value symbol 'user - 'set (list (widget-value child))) + 'set (widget-value child)) (funcall set symbol (eval (widget-value child))) (put symbol 'variable-comment comment) (put symbol 'saved-variable-comment comment)) @@ -2717,8 +2724,8 @@ (put symbol 'saved-value (list (custom-quote (widget-value child)))) (custom-push-theme 'theme-value symbol 'user - 'set (list (custom-quote (widget-value - child)))) + 'set (custom-quote (widget-value + child))) (funcall set symbol (widget-value child)) (put symbol 'variable-comment comment) (put symbol 'saved-variable-comment comment))) @@ -2739,6 +2746,7 @@ (cond ((or value comment) (put symbol 'variable-comment comment) (custom-variable-backup-value widget) + (custom-push-theme 'theme-value symbol 'user 'set value) (condition-case nil (funcall set symbol (eval (car value))) (error nil))) @@ -2759,17 +2767,15 @@ (let* ((symbol (widget-value widget)) (set (or (get symbol 'custom-set) 'set-default))) (if (get symbol 'standard-value) - (progn - (custom-variable-backup-value widget) - (funcall set symbol (eval (car (get symbol 'standard-value))))) + (custom-variable-backup-value widget) (error "No standard setting known for %S" symbol)) (put symbol 'variable-comment nil) (put symbol 'customized-value nil) (put symbol 'customized-variable-comment nil) + (custom-push-theme 'theme-value symbol 'user 'reset nil) + (custom-theme-recalc-variable symbol) (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment)) (put symbol 'saved-value nil) - (custom-push-theme 'theme-value symbol 'user 'reset nil) - (custom-theme-recalc-variable symbol) (put symbol 'saved-variable-comment nil) (custom-save-all)) (widget-put widget :custom-state 'unknown) @@ -2801,6 +2807,7 @@ (if value (progn (custom-variable-backup-value widget) + (custom-push-theme 'theme-value symbol 'user 'set value) (condition-case nil (funcall set symbol (car value)) (error nil))) @@ -3361,6 +3368,7 @@ ;; face-set-spec ignores empty attribute lists, so just give it ;; something harmless instead. (face-spec-set symbol '((t :foreground unspecified)))) + (custom-push-theme 'theme-face symbol 'user 'set value) (put symbol 'customized-face-comment comment) (put symbol 'face-comment comment) (custom-face-state-set widget) @@ -3409,6 +3417,7 @@ (error "No saved value for this face")) (put symbol 'customized-face nil) (put symbol 'customized-face-comment nil) + (custom-push-theme 'theme-face symbol 'user 'set value) (face-spec-set symbol value) (put symbol 'face-comment comment) (widget-value-set child value) @@ -3432,16 +3441,12 @@ (error "No standard setting for this face")) (put symbol 'customized-face nil) (put symbol 'customized-face-comment nil) + (custom-push-theme 'theme-face symbol 'user 'reset nil) + (custom-theme-recalc-face symbol) (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) (put symbol 'saved-face nil) - (custom-push-theme 'theme-face symbol 'user 'reset nil) - (custom-theme-recalc-face symbol) - ;; Do not explictly save resets to standards without themes. - (if (null (cdr (get symbol 'theme-face))) - (put symbol 'theme-face nil)) (put symbol 'saved-face-comment nil) (custom-save-all)) - (face-spec-set symbol value) (put symbol 'face-comment nil) (widget-value-set child value) ;; This call manages the comment visibility