AnthonyDiGirolamo / airline-themes

vim-airline themes https://github.com/vim-airline/vim-airline-themes for emacs powerline https://github.com/milkypostman/powerline
MIT License
123 stars 20 forks source link

Loading theme gives error function "airline-themes-set-deftheme" is void #28

Open lordmilko opened 7 years ago

lordmilko commented 7 years ago

I am using Emacs 25.2 with Spacemacs on Windows 7. When I try to select a theme, I get the error

Symbol’s function definition is void: airline-themes-set-deftheme

As it turns out, I'm not the first person to experience this error

The issue appears to be that each theme does not include the airline-themes.el file that contains this function, and thus rightly concludes the function is undefined.

The solution to this, therefore, is to include the following line in each individual theme file

(require 'airline-themes)

Could this potentially be a difference in how Spacemacs and regular Emacs load all the *.el files of a module?

Note: for anyone that stumbles upon this, if you manually correct your theme file you'll want to delete the corresponding *.elc file so that Emacs can recompile the original source file. The place to install airline-themes in Spacemacs is under dotspacemacs-additional-packages

KyleCotton commented 6 years ago

I am also getting this error: Error (use-package): airline-themes/:init: Symbol’s function definition is void: airline-themes-set-deftheme

Have you had any luck fixing it?

lemon0910 commented 6 years ago

I also met the problem

veirus commented 6 years ago

Maybe because (use-package :init tries to set theme before the package is loaded? It seems that changing :init to :config fixes this.