Function: treemacs-load-theme

treemacs-load-theme is an interactive and byte-compiled function defined in treemacs-themes.el.

Signature

(treemacs-load-theme NAME)

Documentation

Load the theme with the given NAME.

Note that some changes will only take effect after a treemacs buffer was killed and restored.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-themes.el
(defun treemacs-load-theme (name)
  "Load the theme with the given NAME.
Note that some changes will only take effect after a treemacs buffer was killed
and restored."
  (interactive
   (list (completing-read "Theme: " (-map #'treemacs-theme->name treemacs--themes))))
  (treemacs-unless-let (theme (treemacs--find-theme name))
      (treemacs-log-failure "Cannot find theme '%s'." name)
    (setq treemacs--current-theme theme)
    (dolist (buffer (buffer-list))
      (when (memq (buffer-local-value 'major-mode buffer) '(treemacs-mode dired-mode))
        (with-current-buffer buffer
          (treemacs--select-icon-set))))))