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

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

set-face-background doesn't work inside .emacs with GTK


From: Chris Moore
Subject: set-face-background doesn't work inside .emacs with GTK
Date: Mon, 9 Jan 2006 00:28:38 +0100

I'm not sure if this is an Emacs bug or not, but I thought I should report it anyway, just in case.

If I use the following 2 line ~/.emacs file, I would expect my mode-line to have some yellow on it, but it doesn't, it's a white colour:

     (setq default-frame-alist '((foreground-color . "cyan2") (background-color . "black")))
     (set-face-background 'mode-line "yellow3")

It's as if the set-face-background call is being ignored.

If I add a timer, to set the mode-line's colour a few seconds after start-up, that works fine, and the mode-line goes yellow after 5 seconds of being white:

     (run-with-timer 5 nil
             '(lambda ()
                (message "mode-line's background was %s" (face-background 'mode-line))
                (set-face-background 'mode-line "yellow3")))

The message that gets displayed says "mode-line's background was #efebe7".  That's an off-white.  Where's that coming from?

I tried adding a "(sit-for 5)" to my .emacs just before the call to set-face-background, but that didn't make any difference (other than adding 5 seconds to the startup time of course).

I'm running Emacs with "--no-site-file", so it's not a site customisation.

Also, this only seems to happen when I run Emacs in GNOME.  If I use XFCE4, the mod-line is yellow from the start.

This is happening with a freshly built Emacs "--with-gtk" from CVS.  If I specify "-nw" (no window system) the modeline has yellow in it from the outset, although it's in the foreground, not the background), so this is quite probably a GTK issue.  I'm running GNOME 2.13.4 in the development version of Ubuntu Linux.

Chris.

reply via email to

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