Function: custom-initialize-delay

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

Signature

(custom-initialize-delay SYMBOL VALUE)

Documentation

Delay initialization of SYMBOL to the next Emacs start.

This is used in files that are preloaded (or for autoloaded variables), so that the initialization is done in the run-time context rather than the build-time context. This also has the side-effect that the (delayed) initialization is performed with the :set function.

View in manual

Probably introduced at or before Emacs version 24.1.

Source Code

;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun custom-initialize-delay (symbol value)
  "Delay initialization of SYMBOL to the next Emacs start.
This is used in files that are preloaded (or for autoloaded
variables), so that the initialization is done in the run-time
context rather than the build-time context.  This also has the
side-effect that the (delayed) initialization is performed with
the :set function."
  ;; Defvar it so as to mark it special, etc (bug#25770).
  (internal--define-uninitialized-variable symbol)

  ;; Until the var is actually initialized, it is kept unbound.
  ;; This seemed to be at least as good as setting it to an arbitrary
  ;; value like nil (evaluating `value' is not an option because it
  ;; may have undesirable side-effects).
  (if (listp custom-delayed-init-variables)
      (push symbol custom-delayed-init-variables)
    ;; In case this is called after startup, there is no "later" to which to
    ;; delay it, so initialize it "normally" (bug#47072).
    (custom-initialize-reset symbol value)))