aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/cus-edit.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index a9358d66703..052b4ca2dee 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2873,14 +2873,18 @@ Optional EVENT is the location for the menu."
2873 "Prepare for saving WIDGET's face attributes, but don't write `.emacs'." 2873 "Prepare for saving WIDGET's face attributes, but don't write `.emacs'."
2874 (let* ((symbol (widget-value widget)) 2874 (let* ((symbol (widget-value widget))
2875 (child (car (widget-get widget :children))) 2875 (child (car (widget-get widget :children)))
2876 (value (widget-value child)) 2876 (value (custom-post-filter-face-spec (widget-value child)))
2877 (comment-widget (widget-get widget :comment-widget)) 2877 (comment-widget (widget-get widget :comment-widget))
2878 (comment (widget-value comment-widget))) 2878 (comment (widget-value comment-widget)))
2879 (when (equal comment "") 2879 (when (equal comment "")
2880 (setq comment nil) 2880 (setq comment nil)
2881 ;; Make the comment invisible by hand if it's empty 2881 ;; Make the comment invisible by hand if it's empty
2882 (custom-comment-hide comment-widget)) 2882 (custom-comment-hide comment-widget))
2883 (face-spec-set symbol value) 2883 (if (face-spec-choose value)
2884 (face-spec-set symbol value)
2885 ;; face-set-spec ignores empty attribute lists, so just give it
2886 ;; something harmless instead.
2887 (face-spec-set symbol '((t :foreground unspecified))))
2884 (put symbol 'saved-face value) 2888 (put symbol 'saved-face value)
2885 (put symbol 'customized-face nil) 2889 (put symbol 'customized-face nil)
2886 (put symbol 'face-comment comment) 2890 (put symbol 'face-comment comment)