Function: custom-theme-write-variables
custom-theme-write-variables is a byte-compiled function defined in
cus-theme.el.gz.
Signature
(custom-theme-write-variables THEME VARS)
Documentation
Write a custom-theme-set-variables command for THEME.
It includes all variables in list VARS.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-theme.el.gz
(defun custom-theme-write-variables (theme vars)
"Write a `custom-theme-set-variables' command for THEME.
It includes all variables in list VARS."
(when vars
(let ((standard-output (current-buffer)))
(princ "\n(custom-theme-set-variables\n")
(princ " '")
(princ theme)
(princ "\n")
(dolist (spec vars)
(when (widget-get (nth 1 spec) :value)
(let* ((symbol (nth 0 spec))
(widget (nth 2 spec))
(child (car-safe (widget-get widget :children)))
(value (if child
(widget-value child)
;; Child is null if the widget is closed (hidden).
(car (widget-get widget :shown-value)))))
(unless (bolp)
(princ "\n"))
(princ " '(")
(prin1 symbol)
(princ " ")
(prin1 (custom-quote value))
(princ ")"))))
(if (bolp)
(princ " "))
(princ ")")
(when (/= (following-char) ?\n)
(princ "\n")))))