diff options
| author | Miles Bader | 2001-01-20 01:24:15 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-01-20 01:24:15 +0000 |
| commit | e475612a278de1518f0ad2c2f51950de450e2a7e (patch) | |
| tree | 689c9b516481dd1ff517f6450625d42a378afb42 | |
| parent | e1e40b38d1a8968beaac5355d66736be5ac3ff73 (diff) | |
| download | emacs-e475612a278de1518f0ad2c2f51950de450e2a7e.tar.gz emacs-e475612a278de1518f0ad2c2f51950de450e2a7e.zip | |
(custom-face-save): Do post-processing on the face's new value like
`custom-face-set' does.
| -rw-r--r-- | lisp/cus-edit.el | 8 |
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) |