Function: custom-face-save
custom-face-save is a byte-compiled function defined in
cus-edit.el.gz.
Signature
(custom-face-save WIDGET)
Documentation
Save the face edited by WIDGET.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-face-save (widget)
"Save the face edited by WIDGET."
(let ((form (widget-get widget :custom-form)))
(if (memq form '(all lisp))
(custom-face-mark-to-save widget)
;; The user is working on only a selected terminal type;
;; make sure we save the entire spec to `custom-file'. (Bug #40866)
;; If recreating a widget that may have been edited by the user, remember
;; to always save the edited value into the :shown-value property, so
;; we use that value for the recreated widget. (Bug#44331)
(widget-put widget :shown-value (custom-face-widget-to-spec widget))
(custom-face-edit-all widget)
(widget-put widget :shown-value nil) ; Reset it after we used it.
(custom-face-mark-to-save widget)
(if (eq form 'selected)
(custom-face-edit-selected widget)
;; `form' is edit or mismatch; can't happen.
(widget-put widget :custom-form form))))
(custom-save-all)
(custom-face-state-set-and-redraw widget))