From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Add a hook for color-theme switching Date: Sat, 2 Dec 2017 07:38:50 -0800 (PST) Message-ID: References: <2f961f6a-6279-445e-80de-d2eabdd43276@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1512229179 5175 195.159.176.226 (2 Dec 2017 15:39:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2017 15:39:39 +0000 (UTC) To: stardiviner , emacs-help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 02 16:39:34 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eL9t6-0000zk-Mj for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Dec 2017 16:39:32 +0100 Original-Received: from localhost ([::1]:36060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL9tD-0006k6-L4 for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Dec 2017 10:39:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL9sZ-0006jq-MP for help-gnu-emacs@gnu.org; Sat, 02 Dec 2017 10:39:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL9sW-0007fA-Hm for help-gnu-emacs@gnu.org; Sat, 02 Dec 2017 10:38:59 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:45810) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eL9sW-0007dy-7d for help-gnu-emacs@gnu.org; Sat, 02 Dec 2017 10:38:56 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vB2Fcq5S159719; Sat, 2 Dec 2017 15:38:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=zvSw98+7JBPnrkAW55n9McIwhfR3lamF8cU/cWiTwIM=; b=cZn63hZEirnxiD4Eosddn660nFPCPl+z/guJn1OcR1Wwcy/BD0mJVLepnrNQvC20Wedk sGc8Vj2qV5GlIs6fxmD1GZbz1csHg9bdLdmFdWfPqdFQrpHsM+GT3nw9qAhuLto2P/Fo IY7OjJY+2aj7xhpnMM0j7p0a+3iU7GEJS1fPnJ3KEji5t226viGhyGiS1SDjsfMq4eos Dw9EHXD0BVIK1YnX/mcQVE5QH3NfSAyIKfPlFNKhVOGjlRSYmLiMygtfMPLqdaqAlrYV 4vsRPoSDmdCdJdfS85kponz1aRASm08uuLolr0uGvsJdYGntzBDIiILbbAllZSsxrQiX wQ== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2ekpeyghh2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 02 Dec 2017 15:38:52 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vB2Fcp7j025580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 2 Dec 2017 15:38:51 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vB2FcpM5013646; Sat, 2 Dec 2017 15:38:51 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4615.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8732 signatures=668636 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712020231 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115170 Archived-At: > Here is an example showing what I want: > (add-hook 'color-theme-load-hook > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda () > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (set-f= ace-attribute 'hl-sexp-face nil :background ...) > Then the custom faces can be changed automatically according the > color-theme switching. If you really are using color themes (`color-theme.el') then you have `color-theme-mode-hook', but that likely won't help here. There is no `color-theme-load-hook', AFAIK. On the other hand, if you are using custom themes then there are `custom-new-theme-mode-hook' and `custom-theme-choose-mode-hook'. You have not yet made clear which kind of themes you are using (though you keep saying "color theme"): custom themes or color themes.