I've been playing with starting an xemacs on a tty and then using
make-frame-on-display to create an X11 one, but have been running into
some fun coloration issues.
If I explicitly specify colors as attached to frame-types, things work
well:
'(modeline ((((type x)) (:background "lightblue" :foreground
"black"))
(((type tty)) (:background "brightblue" :foreground "white")))
t)
If I rely upon frame-background-type, the right thing does not
happen. The colors are those of the original mode. (i.e. if the
first frame is 'tty-frame (and I generally use a black background in a
terminal) the background-type is dark.. My 'x-frames are light
colored, and have a light background type.
(get-frame-background-mode (get-frame-for-buffer (current-buffer)))
returns appropriately on each evaluation even if the same buffer is
displayed in two frames.
A simple example of a mode that relys on light/dark is hyper-appros.
'((((class color) (background light))
(:foreground "darkred"))
(((class color) (background dark))
(:foreground "gray90")))
But sadly, it doesn't render the colors properly.
(I'm happy to poke at this more, if someone can suggest where to poke.)
Thanks!
-R