title: Change Emacs' background color
body: <p>I have a function that sets Emacs' color theme to a theme defined by myself. In this function I do:</p>
  
  <pre><code>(set-face-attribute 'default cur-frame :foreground fg-color :background bg-color)
  </code></pre>
  
  <p>I then set the background color, foreground color, and cursor color for <code>default-frame-alist</code>, <code>initial-frame-alist</code> and <code>special-display-frame-alist</code>. </p>
  
  <p>All of this works fine on my Mac. But when I use this on Linux, it looks fine for all frames that have already been opened, but on newly created frames it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/PD4pd.png" alt="background color issue"></p>
  
  <p>I do not have this problem with new frames if use the <code>set-background-color</code> / <code>set-foreground-color</code> functions instead of (<code>set-face-attribute 'default ...</code>). But if I do that I have to manually reset the colors for every frame that's already open.</p>
  
  <p>I am using Emacs version 23.3 on both Mac and Ubuntu.</p>
  
  <p>For clarification, this is the theme file I use:</p>
  
  <p><a href="https://bitbucket.org/brownstone/emacs_configuration/src/83edfb4bc0fb/my-color.el" rel="nofollow noreferrer">my-color.el</a></p>