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

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

bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local?


From: Chong Yidong
Subject: bug#11213: 24.0.95; (Maybe/Wish): Should color-themes be buffer local?
Date: Sat, 21 Apr 2012 14:28:21 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux)

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 via email to

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