[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting color themes specific to a frame
From: |
Adam |
Subject: |
Re: Setting color themes specific to a frame |
Date: |
Mon, 20 Feb 2012 10:00:25 +0100 |
Thorsten <quintfall@googlemail.com> writes:
Hi Thorsten,
> Adam <adam_w67@yahoo.com> writes:
>
>> I am using emacs 24, and really enjoy the new color theme feature. I
>> have one little issue, though. I am using one emacs daemon instance,
>> and lots of instances. Some using X11-Frames, some on plain terminals.
>> Is there any method to get the color theme just enabled on X11-frames,
>> but fall back to the default color theme on terminals - or, more
>> general - is there a method to set a color theme only for one specific
>> frame, without affecting the other frames?
>
> I just had a similar problem, and solved it with some help from this
> newsgroup:
>
> I use the same setup like you - one daemon an lots of instances on plain
> terminals and X, and use the following code to have different colors on
> X:
>
> ,-------------------------------------------------------------------
> | (defun tj-set-window-type-dependend-emacsclient-colors ()
> | "Sets emacsclient colors for X.
> | Background-color is set to black and foreground-color to wheat for
> | emacsclient on X"
> | (if (display-graphic-p)
> | (progn
> | (set-background-color "black")
> | (set-foreground-color "wheat"))))
> |
> | (add-hook 'server-visit-hook
> | 'tj-set-window-type-dependend-emacsclient-colors)
> `-------------------------------------------------------------------
>
> Instead of setting background-colors you might be able to change the
> color-theme?
This does not work here. This does not overwrite my color theme
settings.
BTW. changing the variables which store my color theme properties does not
work. Emacs's load-theme, which is called in my init.el, examines the
theme variable and sets all the properties globally. I need a method to
make load-theme set the theme properties frame-local, so I can call it
in my after-make-frame-functions.