ScottyB / ac-js2

Javascript auto-completion in Emacs using Js2-mode's parser and Skewer-mode.
123 stars 8 forks source link

auto-complete error: (void-variable ac-source-js2) #21

Open computersarecool opened 9 years ago

computersarecool commented 9 years ago

That is the error I get when trying to use ac-js2 mode:

It shows no errors but as soon as I try to type something I get:

auto-complete error: (void-variable ac-source-js2) 

Thank you for any help!

computersarecool commented 9 years ago

I think I have isolated the code down to this:

Debugger entered--Lisp error: (invalid-function ac-define-source)                                                                                                                                        
  ac-define-source("js2" ((candidates . ac-js2-ac-candidates) (document . ac-js2-ac-document) (prefix . ac-js2-ac-prefix) (requires . -1)))                                                              
  ac-js2-setup-auto-complete-mode()                                                                                                                                                                      
  ac-js2-mode()                                                                                                                                                                                          
  run-hooks(change-major-mode-after-body-hook prog-mode-hook js2-mode-hook)                                                                                                                              
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook js2-mode-hook))                                                                                                                      
  run-mode-hooks(js2-mode-hook)                                                                                                                                                                          
  js2-mode()                                                                                                                                                                                              
  set-auto-mode-0(js2-mode nil)                                                                                                                                                                          
  set-auto-mode()                                                                                                                                                                                        
  normal-mode(t)                                                                                                                                                                                          
  after-find-file(nil t)                                                                                                                                                                                  
  find-file-noselect-1(#<buffer #wow.js#> "~/Documents/overflow/emacsTest/#wow.js#" nil nil "~/Documents/overflow/emacsTest/#wow.js#" (59027515 16777220))                                                
  find-file-noselect("/Users/Startec/Documents/overflow/emacsTest/#wow.js#" nil nil nil)                                                                                                                  
  find-file("/Users/Startec/Documents/overflow/emacsTest/#wow.js#")                                                                                                                                      
  dired-find-file()                                                                                                                                                                                      
  call-interactively(dired-find-file nil nil)                                                                                                                                                            
  command-execute(dired-find-file)

But can not debug further

dunn commented 9 years ago

This is fixed for me by the patch here: https://github.com/ScottyB/ac-js2/issues/18#issuecomment-74518558