Function: custom-face-mark-to-save
custom-face-mark-to-save is a byte-compiled function defined in
cus-edit.el.gz.
Signature
(custom-face-mark-to-save WIDGET)
Documentation
Mark for saving the face edited by WIDGET.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-face-mark-to-save (widget)
"Mark for saving the face edited by WIDGET."
(let* ((symbol (widget-value widget))
(value (custom-face-widget-to-spec widget))
(comment-widget (widget-get widget :comment-widget))
(comment (widget-value comment-widget))
(standard (eq (widget-get widget :custom-state) 'standard)))
(when (equal comment "")
(setq comment nil)
;; Make the comment invisible by hand if it's empty
(custom-comment-hide comment-widget))
;; See the comments in `custom-face-set'.
(when (and (eq symbol 'default)
(not (get symbol 'custom-face-default-attrs))
(memq (custom-face-state symbol) '(standard themed)))
(put symbol 'custom-face-default-attrs
(custom-face-get-current-spec symbol)))
(custom-push-theme 'theme-face symbol 'user 'set value)
(face-spec-set symbol value (if standard 'reset 'saved-face))
(put symbol 'face-comment comment)
(put symbol 'customized-face-comment nil)
(put symbol 'saved-face-comment comment)))