From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37802: 27.0.50; Feature request: hook for theme enabling/disabling Date: Fri, 20 May 2022 12:58:09 +0200 Message-ID: <87fsl44gji.fsf@gnus.org> References: <87d0euopzw.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13175"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 37802@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 20 12:59:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ns0Lm-0003Gw-L7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 12:59:18 +0200 Original-Received: from localhost ([::1]:37014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns0Ll-00040Z-CD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 06:59:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns0LW-00040H-DE for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 06:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns0LW-0003Wu-4g for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 06:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns0LW-0004Vj-3F for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 06:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2022 10:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37802 X-GNU-PR-Package: emacs Original-Received: via spool by 37802-submit@debbugs.gnu.org id=B37802.165304430217250 (code B ref 37802); Fri, 20 May 2022 10:59:02 +0000 Original-Received: (at 37802) by debbugs.gnu.org; 20 May 2022 10:58:22 +0000 Original-Received: from localhost ([127.0.0.1]:37698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns0Ks-0004UA-Ev for submit@debbugs.gnu.org; Fri, 20 May 2022 06:58:22 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:33426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns0Kq-0004To-BM for 37802@debbugs.gnu.org; Fri, 20 May 2022 06:58:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Kgb++pWI0U9go97NMKWbYCHDkGhTkzmnSJZAC4vJBlo=; b=j68ouKz969eIbkXaNlYXkfTtmJ R1zF/jLrV0dR+2EPs6dsNZxWWNHObvp/V7EJXLwHXO6gOlmpBzq/qmFxMPwUC90y9gF+t/Xpu3ycL BVqz1Xyb8Fn8ybJJDLYN884MVSlm9HE24jp8WkSlLp++f7oAzRNOK5Rpa3c0pxS7Ng5M=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ns0Kh-0006q9-Jy; Fri, 20 May 2022 12:58:14 +0200 X-Now-Playing: Sonoko's _La Debutante_: "In Heaven" In-Reply-To: <87d0euopzw.fsf@telefonica.net> ("=?UTF-8?Q?=C3=93scar?= Fuentes"'s message of "Fri, 18 Oct 2019 02:29:23 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232725 Archived-At: =C3=93scar Fuentes 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. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no