Function: magit-custom-initialize-reset
magit-custom-initialize-reset is a natively compiled function defined
in magit-base.el.
Signature
(magit-custom-initialize-reset SYMBOL EXP)
Documentation
Initialize SYMBOL based on EXP.
Set the value of the variable SYMBOL, using set-default
(unlike custom-initialize-reset, which uses the :set
function if any). The value is either the symbol's current
value (as obtained using the :get function), if any, or
the value in the symbol's saved-value property if any, or
(last of all) the value of EXP.
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-base.el
;;; Kludges for Custom
(defun magit-custom-initialize-reset (symbol exp)
"Initialize SYMBOL based on EXP.
Set the value of the variable SYMBOL, using `set-default'
\(unlike `custom-initialize-reset', which uses the `:set'
function if any). The value is either the symbol's current
value (as obtained using the `:get' function), if any, or
the value in the symbol's `saved-value' property if any, or
\(last of all) the value of EXP."
(set-default-toplevel-value
symbol
(condition-case nil
(let ((def (default-toplevel-value symbol))
(getter (get symbol 'custom-get)))
(if getter (funcall getter symbol) def))
(error
(eval (let ((sv (get symbol 'saved-value)))
(if sv (car sv) exp)))))))