Reputation: 4237
When I load my .emacs
, although the color theme, twilight, loads up fine, but it shows me this error message:
Symbol's function definition is void: color-theme-twilight
In my .emacs
I have put the following lines to add the color theme:
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-initialize)
(color-theme-twilight)
The color-theme-twilight.el
file lives in ~/.emacs.d/themes/
I looked at this question. But the solution there is a correction to a typo. But I am not making that typo. I am on emacs24. What is the problem?
Upvotes: 9
Views: 28931
Reputation: 4237
Solved the problem. Removed all the lines :
(require 'color-theme)
(setq color-theme-is-global t)
(color-theme-initialize)
(color-theme-twilight)
And just added:
(load-file "~/.emacs.d/themes/color-theme-twilight.el")
The problem was the last line:
(color-theme-twilight)
Other three lines are not required at all. Not sure if this is the most elegant solution.
Upvotes: 7
Reputation: 30701
You say "The color-theme-twilight.el
file lives in ~/.emacs.d/themes/." But I don't see where you load that file. Add (require 'color-theme-twilight)
to your init file, and make sure color-theme-twilight.el
is in your load-path
.
Upvotes: 0
Reputation: 9380
If you are using emacs 24, I think you could change the 4 lines you include by this single line:
(load-theme 'twilight t)
No extra requires; this use the emacs 24 theme approach.
If you are using a recent version of twilight, that should give you no error.
Upvotes: 0