Function: treemacs-modify-theme
treemacs-modify-theme is a macro defined in treemacs-themes.el.
Signature
(treemacs-modify-theme THEME &key ICON-DIRECTORY CONFIG)
Documentation
Modify an existing THEME.
- THEME can either be a treemacs-theme object or the name of a theme.
- For the scope of the modification an alternative ICON-DIRECTORY can also be
used.
- CONFIG will be applied to the THEME in the same manner as in
treemacs-create-theme.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-themes.el
(cl-defmacro treemacs-modify-theme (theme &key icon-directory config)
"Modify an existing THEME.
- THEME can either be a treemacs-theme object or the name of a theme.
- For the scope of the modification an alternative ICON-DIRECTORY can also be
used.
- CONFIG will be applied to the THEME in the same manner as in
`treemacs-create-theme'."
(declare (indent 1))
(treemacs-static-assert (not (null theme))
"Theme may not be null.")
`(treemacs-unless-let (theme (if (stringp ,theme) (treemacs--find-theme ,theme) ,theme))
(user-error "Theme '%s' does not exist" ,theme)
(let* ((treemacs--current-theme theme)
(original-icon-dir (treemacs-theme->path theme))
(new-icon-dir (if ,icon-directory ,icon-directory original-icon-dir)))
(unwind-protect
(progn
(setf (treemacs-theme->path theme) new-icon-dir)
,config
(treemacs--propagate-new-icons theme))
(setf (treemacs-theme->path theme) original-icon-dir))
nil)))