Function: eca-chat--register-theme-refresh
eca-chat--register-theme-refresh is a natively compiled function
defined in eca-chat.el.
Signature
(eca-chat--register-theme-refresh)
Documentation
Keep theme-derived faces in sync after a theme switch.
Global and idempotent. Registered globally because a theme switch
runs from whatever buffer is current, not the chat buffer (#301).
Emacs < 29 has no enable-theme-functions, so advise
enable-theme / disable-theme there instead.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--register-theme-refresh ()
"Keep theme-derived faces in sync after a theme switch.
Global and idempotent. Registered globally because a theme switch
runs from whatever buffer is current, not the chat buffer (#301).
Emacs < 29 has no `enable-theme-functions', so advise
`enable-theme' / `disable-theme' there instead."
(if (>= emacs-major-version 29)
(progn
(add-hook 'enable-theme-functions #'eca-chat--refresh-theme-faces)
(add-hook 'disable-theme-functions #'eca-chat--refresh-theme-faces))
(advice-add 'enable-theme :after #'eca-chat--refresh-theme-faces)
(advice-add 'disable-theme :after #'eca-chat--refresh-theme-faces)))