Function: custom-theme-merge-theme
custom-theme-merge-theme is an interactive and byte-compiled function
defined in cus-theme.el.gz.
Signature
(custom-theme-merge-theme THEME)
Documentation
Merge the custom theme THEME's settings into the current buffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cus-theme.el.gz
(defun custom-theme-merge-theme (theme)
"Merge the custom theme THEME's settings into the current buffer."
(interactive
(list
(intern (completing-read "Merge custom theme: "
(mapcar #'symbol-name
(custom-available-themes))))))
(unless (eq theme 'user)
(unless (custom-theme-name-valid-p theme)
(error "Invalid theme name `%s'" theme))
(load-theme theme nil t))
(let ((settings (reverse (get theme 'theme-settings))))
(dolist (setting settings)
(let ((option (eq (car setting) 'theme-value))
(name (nth 1 setting))
(value (nth 3 setting)))
(unless (and option
(memq name '(custom-enabled-themes
custom-safe-themes)))
(funcall (if option
#'custom-theme-add-variable
#'custom-theme-add-face)
name value)))))
theme)