Przemysław Kryger <[email protected]> writes:

> I switch between different themes for my daily Emacs usage (via package
> auto-dark-mode).  After a theme switch, I adjust a few faces to use
> current theme colour palette.  However, I am not sure what to do with
> colours defined in `org-src-block-faces'.
>
> What I am using is the following (simplified version) in
> `modus-themes-after-load-theme-hook':
>
> (modus-themes-with-colors
>   (setopt org-src-block-faces
>           `(("emacs-lisp" (:background ,bg-magenta-nuanced)))))
[...]

With help of pinmacs (Thank you!) I ended up with much simpler snippet
that runs in `modus-themes-after-load-theme-hook'.  Attaching here for
posterity:

--8<---------------cut here---------------start------------->8---
(dolist (buffer (buffer-list))
  (with-current-buffer buffer
    (when (derived-mode-p '(org-mode))
      (font-lock-flush))))
--8<---------------cut here---------------end--------------->8---

Cheers,
PK

Reply via email to