Function: custom-theme-checkbox-toggle
custom-theme-checkbox-toggle is a byte-compiled function defined in
cus-theme.el.gz.
Signature
(custom-theme-checkbox-toggle WIDGET &optional EVENT)
Source Code
;; Defined in /usr/src/emacs/lisp/cus-theme.el.gz
(defun custom-theme-checkbox-toggle (widget &optional event)
(let ((this-theme (widget-get widget :theme-name)))
(if (widget-value widget)
;; Disable the theme.
(progn
(disable-theme this-theme)
(widget-toggle-action widget event))
;; Enable the theme.
(unless custom-theme-allow-multiple-selections
;; If only one theme is allowed, disable all other themes and
;; uncheck their boxes.
(dolist (theme custom-enabled-themes)
(and (not (eq theme this-theme))
(assq theme custom--listed-themes)
(disable-theme theme)))
(dolist (theme custom--listed-themes)
(unless (eq (car theme) this-theme)
(widget-value-set (cdr theme) nil)
(widget-apply (cdr theme) :notify (cdr theme) event))))
(when (load-theme this-theme)
(widget-toggle-action widget event)))
;; Mark `custom-enabled-themes' as "set for current session".
(put 'custom-enabled-themes 'customized-value
(list (custom-quote custom-enabled-themes)))))