Function: custom-variable-modified-p
custom-variable-modified-p is a byte-compiled function defined in
cus-edit.el.gz.
Signature
(custom-variable-modified-p WIDGET)
Documentation
Non-nil if the variable value of WIDGET has been modified.
WIDGET should be a custom-variable widget, whose first child is the widget
that holds the value.
Modified means that the widget that holds the value has been edited by the user
in a customize buffer.
To check for other states, call custom-variable-state.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-variable-modified-p (widget)
"Non-nil if the variable value of WIDGET has been modified.
WIDGET should be a custom-variable widget, whose first child is the widget
that holds the value.
Modified means that the widget that holds the value has been edited by the user
in a customize buffer.
To check for other states, call `custom-variable-state'."
(catch 'get-error
(let* ((form (widget-get widget :custom-form))
(symbol (widget-get widget :value))
(get (or (get symbol 'custom-get) 'default-value))
(value (if (default-boundp symbol)
(condition-case nil
(funcall get symbol)
(error (throw 'get-error t)))
(symbol-value symbol)))
(orig-value (widget-value (car (widget-get widget :children)))))
(not (equal (if (memq form '(lisp mismatch))
;; Mimic `custom-variable-value-create'.
(custom-quote value)
value)
orig-value)))))