I'm using GUI Emacs. My background color remains the same no matter which custom theme I load. It may not matter, but when I load a different theme, I always get the message:

message [sml] sml/theme set to automatic

in the minibuffer. Possibly pertinent elisp is:

(require 'powerline)
(setq sml/theme 'powerline)

I use a slightly modified version of solarized-light as my theme. In my .emacs file I have:

(load-theme 'my-solarized-light 1)
;; (set-background-color "#fffff0")   ;; not necessary because theme was customized

The only difference between solarized-light and my-solarized-light is that I've set the background color to #FFFFF0 instead of #FDF6E3. One problem I have is that I can't remember how I did that.

Near the top of my .emacs file, under custom-set-variables, is

'(custom-enabled-themes (quote (my-solarized-light)))

How do I make "load-theme" work correctly again?


I had the same problem.

I had modified some font settings through describe-face which had set values in custom-set-faces in my .spacemacs file.

 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(org-table ((t (:background "black" :foreground "#586e75" :weight bold)))))

This seemed to then be applying a background colour to all themes. Removing this customisation and restarting spacemacs solved the problem.

  • 2
    I had the same problem, but instead of completely removing the customisation, I only erased :background and :foreground entries. And it worked. Dec 6 '19 at 11:59
  • I had this problem also and actually somehow had 2 custom-set-faces calls in my spacemacs file :/
    – Yourpalal
    Jun 8 '20 at 18:32

If you have enabled and use Session Saving, it looks like the .emacs.d/.emacs.desktop file keeps a copy of background-color in this file too. Removing it was the solution for me.

Note: Modifying the .emacs.desktop file inside emacs while having enabled (desktop-save-mode 1) on your emacs session will make emacs ask you, when exiting emacs, if you really want to update .emacs.desktop as it has been modified externally. You want to say NO this time only as emacs will update it with its own in-memory copy, potentially with the variable background-color set to something you want to get rid of.

(First time poster, please be gentle :) )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.