in a customize buffer.
To check for other states, call `custom-variable-state'."
(catch 'get-error
- (let* ((symbol (widget-get widget :value))
+ (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))))
- (not (equal value (widget-value (car (widget-get widget :children))))))))
+ (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)))))
(defun custom-variable-state-set (widget &optional state)
"Set the state of WIDGET to STATE.