From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local? Date: Sat, 21 Apr 2012 14:28:21 +0800 Message-ID: <871unhzji2.fsf@gnu.org> References: <81wr5n2vw5.fsf@gmail.com> <87lim2oiv1.fsf@gnu.org> <81sjgablum.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334989785 22148 80.91.229.3 (21 Apr 2012 06:29:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 06:29:45 +0000 (UTC) Cc: 11213@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 21 08:29:40 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SLTpD-0007TK-8M for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 08:29:39 +0200 Original-Received: from localhost ([::1]:35802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLTpC-0003Qa-C9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 02:29:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLTpA-0003QL-6d for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 02:29:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLTp8-000570-Gf for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 02:29:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLTp8-00056t-DK for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 02:29:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SLTpa-0003mm-9q for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Apr 2012 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11213 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11213-submit@debbugs.gnu.org id=B11213.133498974414461 (code B ref 11213); Sat, 21 Apr 2012 06:30:02 +0000 Original-Received: (at 11213) by debbugs.gnu.org; 21 Apr 2012 06:29:04 +0000 Original-Received: from localhost ([127.0.0.1]:45015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLTob-0003l0-VB for submit@debbugs.gnu.org; Sat, 21 Apr 2012 02:29:03 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:45845 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLToZ-0003kj-FO for 11213@debbugs.gnu.org; Sat, 21 Apr 2012 02:29:00 -0400 Original-Received: from bb116-14-12-6.singnet.com.sg ([116.14.12.6]:38695 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SLTo4-0005w0-H5; Sat, 21 Apr 2012 02:28:29 -0400 In-Reply-To: <81sjgablum.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 11 Apr 2012 16:02:01 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59343 Archived-At: Jambunathan K writes: >> Probably the best way to do that is to set up face remappings in the >> to-be-exported buffer. See the Face Remapping node in the Lisp manual >> for details. > > Given a(ny) theme, let's say "adwaita-theme.el", can someone give me a > recipe which runs through all the face definitions defined in that theme > file and hand it off to `face-remapping-alist'. Do (get 'adwaita 'theme-settings) and collect all the face settings in the resulting list. Each list element should have the form (theme-face FACE adwaita SPEC) where FACE is a face which is customized by the theme, and SPEC is the face spec specified. Once you know FACE, you probably want to (face-spec-choose (face-default-spec FACE) to get the face attributes for the face's default (uncustomized, unthemed) face spec, on the selected frame. Then you can put that attribute in face-remapping-alist.