Function: custom-variable-state-set

custom-variable-state-set is a byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-variable-state-set WIDGET &optional STATE)

Documentation

Set the state of WIDGET to STATE.

If STATE is nil, the new state is computed by custom-variable-modified-p if WIDGET has been edited in the Custom buffer, or by custom-variable-state otherwise.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-variable-state-set (widget &optional state)
  "Set the state of WIDGET to STATE.
If STATE is nil, the new state is computed by `custom-variable-modified-p' if
WIDGET has been edited in the Custom buffer, or by `custom-variable-state'
otherwise."
  (widget-put widget :custom-state
	      (or state
                  (and (custom-variable-modified-p widget) 'modified)
                  (custom-variable-state (widget-value widget)
                                         (widget-value
                                          (car
                                           (widget-get widget :children)))))))