Function: customize-mark-to-save
customize-mark-to-save is a byte-compiled function defined in
custom.el.gz.
Signature
(customize-mark-to-save SYMBOL)
Documentation
Mark SYMBOL for later saving.
If the default value of SYMBOL is different from the standard value,
set the saved-value property to a list whose car evaluates to the
default value. Otherwise, set it to nil.
To actually save the value, call custom-save-all.
Return non-nil if the saved-value property actually changed.
Source Code
;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun customize-mark-to-save (symbol)
"Mark SYMBOL for later saving.
If the default value of SYMBOL is different from the standard value,
set the `saved-value' property to a list whose car evaluates to the
default value. Otherwise, set it to nil.
To actually save the value, call `custom-save-all'.
Return non-nil if the `saved-value' property actually changed."
(custom-load-symbol symbol)
(let* ((get (or (get symbol 'custom-get) #'default-value))
(value (funcall get symbol))
(saved (get symbol 'saved-value))
(comment (get symbol 'customized-variable-comment)))
;; Save default value if different from standard value.
(put symbol 'saved-value
(unless (custom--standard-value-p symbol value)
(list (custom-quote value))))
;; Clear customized information (set, but not saved).
(put symbol 'customized-value nil)
;; Save any comment that might have been set.
(when comment
(put symbol 'saved-variable-comment comment))
(not (equal saved (get symbol 'saved-value)))))