Function: magit-custom-initialize-reset

magit-custom-initialize-reset is a byte-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 ~/.emacs.d/elpa/magit-20260411.1452/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)))))))