Function: customize-mark-as-set

customize-mark-as-set is a byte-compiled function defined in custom.el.gz.

Signature

(customize-mark-as-set SYMBOL)

Documentation

Mark current value of SYMBOL as being set from customize.

If the default value of SYMBOL is different from the saved value if any, or else if it is different from the standard value, set the customized-value property to a list whose car evaluates to the default value. Otherwise, set it to nil.

Return non-nil if the customized-value property actually changed.

Source Code

;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun customize-mark-as-set (symbol)
  "Mark current value of SYMBOL as being set from customize.

If the default value of SYMBOL is different from the saved value if any,
or else if it is different from the standard value, set the
`customized-value' property to a list whose car evaluates to the
default value.  Otherwise, set it to nil.

Return non-nil if the `customized-value' property actually changed."
  (custom-load-symbol symbol)
  (let* ((get (or (get symbol 'custom-get) #'default-value))
	 (value (funcall get symbol))
	 (customized (get symbol 'customized-value))
	 (old (or (get symbol 'saved-value) (get symbol 'standard-value))))
    ;; Mark default value as set if different from old value.
    (if (not (and old
                  (equal value (ignore-errors
                                 (eval (car old))))))
	(progn (put symbol 'customized-value (list (custom-quote value)))
	       (custom-push-theme 'theme-value symbol 'user 'set
				  (custom-quote value)))
      (custom-push-theme 'theme-value symbol 'user
                         (if (get symbol 'saved-value) 'set 'reset)
                         (custom-quote value))
      (put symbol 'customized-value nil))
    ;; Changed?
    (not (equal customized (get symbol 'customized-value)))))