diff lisp/cus-edit.el @ 69624:efd1add5bedf

* cus-edit.el (custom-face-set): Call custom-push-theme before face-spec set so that `changed' theme is correctly saved. (custom-face-reset-standard): Reset to recalculated face rather than defface spec. * custom.el (custom-push-theme): Only save `changed' theme if the current face does not match the defface specs.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 21 Mar 2006 16:44:10 +0000
parents a22167168ac4
children dc1f0ab7e276 e6bf73e43cf4
line wrap: on
line diff
--- a/lisp/cus-edit.el	Tue Mar 21 14:39:41 2006 +0000
+++ b/lisp/cus-edit.el	Tue Mar 21 16:44:10 2006 +0000
@@ -3412,12 +3412,12 @@
       ;; Make the comment invisible by hand if it's empty
       (custom-comment-hide comment-widget))
     (put symbol 'customized-face value)
+    (custom-push-theme 'theme-face symbol 'user 'set value)
     (if (face-spec-choose value)
 	(face-spec-set symbol value)
       ;; 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)
@@ -3490,13 +3490,17 @@
     (put symbol 'customized-face nil)
     (put symbol 'customized-face-comment nil)
     (custom-push-theme 'theme-face symbol 'user 'reset)
+    (face-spec-set symbol value)
     (custom-theme-recalc-face symbol)
     (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
       (put symbol 'saved-face nil)
       (put symbol 'saved-face-comment nil)
       (custom-save-all))
     (put symbol 'face-comment nil)
-    (widget-value-set child value)
+    (widget-value-set child
+		      (custom-pre-filter-face-spec
+		       (list (list t (custom-face-attributes-get
+				      symbol nil)))))
     ;; This call manages the comment visibility
     (widget-value-set comment-widget "")
     (custom-face-state-set widget)