I am trying to get Emacs (v24.3.1) to load a new custom theme in created frames. That is, I have my default theme in my initial frame, and all subsequent frames should get a separate theme (allowing me to easily identify the initial frame).
Here is what I have so far:
;make new frames use a different custom theme
(defun apply-custom-theme (frame)
"Apply custom theme to a frame based on whether its a 'real'
window or a console window."
(select-frame frame)
(if (window-system frame)
(load-theme 'light-blue t)
(load-theme 'tango-black t)))
(add-hook 'after-make-frame-functions 'apply-custom-theme)
This works, except that the theme loaded affects ALL frames, including the initial one. [I am aware that even without my hook, 'load-theme' in one frame will affect all frames.]
I know I can achieve this goal with the older color-theme facility ... I'm curious to see if it can also be done with Emacs 24x custom themes (which would permit easy creation and customization of new themes, among other things).
I don't think the custom-theme support can do frame-specific themes, currently. It can probably support (with a bit of extra coding) using different themes for different kinds of frames (e.g. one theme for tty and another for X11), tho.
I suggest you M-x report-emacs-bug
requesting a new (set of) feature(s) for that kind of situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With