Function: custom-theme-recalc-variable

custom-theme-recalc-variable is a byte-compiled function defined in custom.el.gz.

Signature

(custom-theme-recalc-variable VARIABLE)

Documentation

Set VARIABLE according to currently enabled custom themes.

Source Code

;; Defined in /usr/src/emacs/lisp/custom.el.gz
(defun custom-theme-recalc-variable (variable)
  "Set VARIABLE according to currently enabled custom themes."
  (let ((valspec (custom-variable-theme-value variable)))
    ;; We used to save VALSPEC under the saved-value property unconditionally,
    ;; but that is a recipe for trouble because we might end up saving session
    ;; customizations if the user loads a theme.  (Bug#21355)
    ;; It's better to only use the saved-value property to stash the value only
    ;; if we really need to stash it (i.e., VARIABLE is void).
    (condition-case nil
        (default-toplevel-value variable) ; See if it doesn't fail.
      (void-variable (when valspec
                       (put variable 'saved-value valspec))))
    (unless valspec
      (setq valspec (get variable 'standard-value)))
    (if (and valspec
	     (or (get variable 'force-value)
		 (default-boundp variable)))
        (funcall (or (get variable 'custom-set) #'set-default) variable
		 (eval (car valspec))))))