Open csfreebird opened 10 years ago
Hi, I got this problem too, and I noticed the content of the function "ac-common-setup" was comment out in the latest version of auto-complete, seems that's why ac-common-setup is void. I redefined the function as auto-complete's manual said and put it ahead of the add-hook operations:
(require 'auto-complete-clang-async)
(defun ac-cc-mode-setup ()
(setq ac-clang-complete-executable "~/.emacs.d/clang-complete")
(setq ac-sources '(ac-source-clang-async))
(ac-clang-launch-completion-process)
)
(defun ac-common-setup ()
())
(defun my-ac-config ()
(add-hook 'c-mode-common-hook 'ac-cc-mode-setup)
(add-hook 'auto-complete-mode-hook 'ac-common-setup)
(global-auto-complete-mode t))
(my-ac-config)
It looks working fine in my environment (ArchLinux, emacs 24.3.1), but I'm noob to emacs and elisp, I'm really not sure will this temporary redefined function make any other problems. Just for your information.
Does it work if you put, e.g.
(ac-config-default)
;; ...
above the code snippet provided in the README.md
?
run-hooks: Symbol's function definition is void: ac-common-setup Error in post-command-hook (global-auto-complete-mode-check-buffers): (void-function ac-common-setup)
On Ubuntu 13.04
Installed auto-complete in emacs 24 using package system