From: Miles Bader Date: Sat, 20 Jan 2001 01:24:15 +0000 (+0000) Subject: (custom-face-save): Do post-processing on the face's new value like X-Git-Tag: emacs-pretest-21.0.96~184 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e475612a278de1518f0ad2c2f51950de450e2a7e;p=emacs.git (custom-face-save): Do post-processing on the face's new value like `custom-face-set' does. --- 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." "Prepare for saving WIDGET's face attributes, but don't write `.emacs'." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) - (value (widget-value child)) + (value (custom-post-filter-face-spec (widget-value child))) (comment-widget (widget-get widget :comment-widget)) (comment (widget-value comment-widget))) (when (equal comment "") (setq comment nil) ;; Make the comment invisible by hand if it's empty (custom-comment-hide comment-widget)) - (face-spec-set symbol 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)))) (put symbol 'saved-face value) (put symbol 'customized-face nil) (put symbol 'face-comment comment)