bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37802: 27.0.50; Feature request: hook for theme enabling/disabling


From: Lars Ingebrigtsen
Subject: bug#37802: 27.0.50; Feature request: hook for theme enabling/disabling
Date: Fri, 20 May 2022 12:58:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Óscar Fuentes <ofv@wanadoo.es> writes:

> I'm experimenting with some code that uses face-remap-add-relative to
> modify colors on specific windows. It takes the attribute of an existing
> face, alters it and uses :filtered to apply the change conditionally. On
> my specific case I use that technique for darkening the default
> background of the windows that have no keyboard focus.
>
> However, when I switch themes I have to manually force the recalculation
> of the "darked" background to adapt it to the new theme. If I had a hook
> that fires *after* a theme is enabled or disabled, I could automatize
> the recalculation.
>
> I looked at custom.el and the change seems simple enough so I wonder if
> there is any reason for not implementing such hook.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

If this is for a package, I think it might make more sense to use
`advice-add' on `enable-theme'?  But I wouldn't mind adding a an
`enable-theme-hook' here, if that makes things substantially easier for
your use case.


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]