Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "Symbol's function definition is void" while loading up a color theme in emacs24?

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?

like image 418
Indradhanush Gupta Avatar asked Oct 15 '13 06:10

Indradhanush Gupta


1 Answers

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.

like image 88
Indradhanush Gupta Avatar answered Nov 03 '22 01:11

Indradhanush Gupta