ac-js2 icon indicating copy to clipboard operation
ac-js2 copied to clipboard

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

Open computersarecool opened this issue 10 years ago • 2 comments

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 avatar Apr 28 '15 01:04 computersarecool

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

computersarecool avatar Apr 28 '15 01:04 computersarecool

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

dunn avatar Aug 05 '15 03:08 dunn