Mercurial > emacs
changeset 35441:d85fe63db92b
(custom-face-save): Do post-processing on the face's new value like
`custom-face-set' does.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 20 Jan 2001 01:24:15 +0000 |
parents | 21817d18668c |
children | 814aad0f33b0 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Fri Jan 19 23:38:06 2001 +0000 +++ b/lisp/cus-edit.el Sat Jan 20 01:24:15 2001 +0000 @@ -2873,14 +2873,18 @@ "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)