unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@gnu.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 11213@debbugs.gnu.org
Subject: bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local?
Date: Sat, 21 Apr 2012 14:28:21 +0800	[thread overview]
Message-ID: <871unhzji2.fsf@gnu.org> (raw)
In-Reply-To: <81sjgablum.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 11 Apr 2012 16:02:01 +0530")

Jambunathan K <kjambunathan@gmail.com> 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.





  reply	other threads:[~2012-04-21  6:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 20:07 bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local? Jambunathan K
2012-04-10 20:24 ` Drew Adams
2012-04-10 20:32   ` Jambunathan K
2012-04-11  6:58 ` Chong Yidong
2012-04-11 10:32   ` Jambunathan K
2012-04-21  6:28     ` Chong Yidong [this message]
2012-04-25 19:07       ` Jambunathan K
2012-04-21 16:01 ` Victor Borja
2013-11-15  5:05 ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871unhzji2.fsf@gnu.org \
    --to=cyd@gnu.org \
    --cc=11213@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).