I want to understand why an expression of the form
(load-theme 'my-kewl-theme t)
fails1 when run as the last expression in my init (
~/.emacs) file, but works fine if I evaluate it as soon as soon as Emacs' startup is done.
How can I troubleshoot/debug this conundrum?
The only clue I have is that right before
(load-theme 'my-kewl-theme t) is evaluated at the end of the loading of
~/.emacs, the variable
custom-theme-load-path has the value
whereas after Emacs starts, it has the value
("/path/to/my-kewl-theme/" custom-theme-load-directory t)
I don't know what accounts for this difference. (This variable is not referred to at all by
~/.emacs, at least explicitly.) The variable
custom-theme-load-directory has the value
error: Unable to find theme file for `my-kewl-theme`