Function: custom-initialize-changed

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

Signature

(custom-initialize-changed SYMBOL EXP)

Documentation

Initialize SYMBOL with EXP.

Like custom-initialize-reset, but only use the :set function if not using the standard setting. For the standard setting, use set-default.

Source Code

;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun custom-initialize-changed (symbol exp)
  "Initialize SYMBOL with EXP.
Like `custom-initialize-reset', but only use the `:set' function if
not using the standard setting.
For the standard setting, use `set-default'."
  (condition-case nil
      (let ((def (default-toplevel-value symbol)))
        (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
                 symbol
                 (let ((getter (get symbol 'custom-get)))
                   (if getter (funcall getter symbol) def))))
    (error
     (cond
      ((get symbol 'saved-value)
       (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
                symbol
                (eval (car (get symbol 'saved-value)))))
      (t
       (set-default symbol (eval exp)))))))