I use defun to define a function in my .emacs file:
(defun myfun ()
"i am already loaded the color-theme lib"
(color-theme-initialize)
(color-theme-darkblue))
Then I want to use this function in my mode-hook:
(add-hook 'python-mode-hook
'(lambda ()
(myfun)
(...)))
But I got an error saying that the color-theme-initialize function is void.
P.S. my ~/.emacs snippet
(progn (require 'color-theme)
(color-theme-initialize))
(progn (setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq indent-line-function 'insert-tab))
(add-hook 'emacs-lisp-mode-hook
'(lambda ()
(color-theme-resolve)
(show-paren-mode t)
(linum-mode t)))
You need to
require(or otherwise load) the library which providescolor-theme-initialize. I’m guessing(require 'color-theme).