Function: custom-initialize-set

custom-initialize-set is a byte-compiled function defined in custom.el.gz.

Signature

(custom-initialize-set SYMBOL EXP)

Documentation

Initialize SYMBOL based on EXP.

If the symbol doesn't have a default binding already, then set it using its :set function (or set-default-toplevel-value if it has none).

The value is either the value in the symbol's saved-value property, if any, or the value of EXP.

Source Code

;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun custom-initialize-set (symbol exp)
  "Initialize SYMBOL based on EXP.
If the symbol doesn't have a default binding already, then set it
using its `:set' function (or `set-default-toplevel-value' if it
has none).

The value is either the value in the symbol's `saved-value' property,
if any, or the value of EXP."
  (condition-case nil
      (default-toplevel-value symbol)
    (error
     (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
              symbol
              (eval (let ((sv (get symbol 'saved-value)))
                      (if sv (car sv) exp)))))))