Mercurial > emacs
comparison lisp/cus-edit.el @ 87486:a4cfa0059507
(custom-face-set): Call `face-spec-set' with FOR-DEFFACE.
(custom-face-save): Likewise.
(custom-face-reset-saved, custom-face-reset-standard): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 30 Dec 2007 03:35:58 +0000 |
parents | 005ad07af670 |
children | 6a0c500ca3a9 |
comparison
equal
deleted
inserted
replaced
87485:0ef4914a2852 | 87486:a4cfa0059507 |
---|---|
3494 ;; Make the comment invisible by hand if it's empty | 3494 ;; Make the comment invisible by hand if it's empty |
3495 (custom-comment-hide comment-widget)) | 3495 (custom-comment-hide comment-widget)) |
3496 (put symbol 'customized-face value) | 3496 (put symbol 'customized-face value) |
3497 (custom-push-theme 'theme-face symbol 'user 'set value) | 3497 (custom-push-theme 'theme-face symbol 'user 'set value) |
3498 (if (face-spec-choose value) | 3498 (if (face-spec-choose value) |
3499 (face-spec-set symbol value) | 3499 (face-spec-set symbol value t) |
3500 ;; face-set-spec ignores empty attribute lists, so just give it | 3500 ;; face-set-spec ignores empty attribute lists, so just give it |
3501 ;; something harmless instead. | 3501 ;; something harmless instead. |
3502 (face-spec-set symbol '((t :foreground unspecified)))) | 3502 (face-spec-set symbol '((t :foreground unspecified)) t)) |
3503 (put symbol 'customized-face-comment comment) | 3503 (put symbol 'customized-face-comment comment) |
3504 (put symbol 'face-comment comment) | 3504 (put symbol 'face-comment comment) |
3505 (custom-face-state-set widget) | 3505 (custom-face-state-set widget) |
3506 (custom-redraw-magic widget))) | 3506 (custom-redraw-magic widget))) |
3507 | 3507 |
3516 (setq comment nil) | 3516 (setq comment nil) |
3517 ;; Make the comment invisible by hand if it's empty | 3517 ;; Make the comment invisible by hand if it's empty |
3518 (custom-comment-hide comment-widget)) | 3518 (custom-comment-hide comment-widget)) |
3519 (custom-push-theme 'theme-face symbol 'user 'set value) | 3519 (custom-push-theme 'theme-face symbol 'user 'set value) |
3520 (if (face-spec-choose value) | 3520 (if (face-spec-choose value) |
3521 (face-spec-set symbol value) | 3521 (face-spec-set symbol value t) |
3522 ;; face-set-spec ignores empty attribute lists, so just give it | 3522 ;; face-set-spec ignores empty attribute lists, so just give it |
3523 ;; something harmless instead. | 3523 ;; something harmless instead. |
3524 (face-spec-set symbol '((t :foreground unspecified)))) | 3524 (face-spec-set symbol '((t :foreground unspecified)) t)) |
3525 (unless (eq (widget-get widget :custom-state) 'standard) | 3525 (unless (eq (widget-get widget :custom-state) 'standard) |
3526 (put symbol 'saved-face value)) | 3526 (put symbol 'saved-face value)) |
3527 (put symbol 'customized-face nil) | 3527 (put symbol 'customized-face nil) |
3528 (put symbol 'face-comment comment) | 3528 (put symbol 'face-comment comment) |
3529 (put symbol 'customized-face-comment nil) | 3529 (put symbol 'customized-face-comment nil) |
3546 (unless (or value comment) | 3546 (unless (or value comment) |
3547 (error "No saved value for this face")) | 3547 (error "No saved value for this face")) |
3548 (put symbol 'customized-face nil) | 3548 (put symbol 'customized-face nil) |
3549 (put symbol 'customized-face-comment nil) | 3549 (put symbol 'customized-face-comment nil) |
3550 (custom-push-theme 'theme-face symbol 'user 'set value) | 3550 (custom-push-theme 'theme-face symbol 'user 'set value) |
3551 (face-spec-set symbol value) | 3551 (face-spec-set symbol value t) |
3552 (put symbol 'face-comment comment) | 3552 (put symbol 'face-comment comment) |
3553 (widget-value-set child value) | 3553 (widget-value-set child value) |
3554 ;; This call manages the comment visibility | 3554 ;; This call manages the comment visibility |
3555 (widget-value-set comment-widget (or comment "")) | 3555 (widget-value-set comment-widget (or comment "")) |
3556 (custom-face-state-set widget) | 3556 (custom-face-state-set widget) |
3570 (unless value | 3570 (unless value |
3571 (error "No standard setting for this face")) | 3571 (error "No standard setting for this face")) |
3572 (put symbol 'customized-face nil) | 3572 (put symbol 'customized-face nil) |
3573 (put symbol 'customized-face-comment nil) | 3573 (put symbol 'customized-face-comment nil) |
3574 (custom-push-theme 'theme-face symbol 'user 'reset) | 3574 (custom-push-theme 'theme-face symbol 'user 'reset) |
3575 (face-spec-set symbol value) | 3575 (face-spec-set symbol value t) |
3576 (custom-theme-recalc-face symbol) | 3576 (custom-theme-recalc-face symbol) |
3577 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) | 3577 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) |
3578 (put symbol 'saved-face nil) | 3578 (put symbol 'saved-face nil) |
3579 (put symbol 'saved-face-comment nil) | 3579 (put symbol 'saved-face-comment nil) |
3580 (custom-save-all)) | 3580 (custom-save-all)) |