1

I got these lines:

;; turn on semantic
(semantic-mode 1)

;; define a function which adds semantic as backup to auto-complete
(defun my:add-semantic-to-autocomplete()
  (add-to-list 'ac-sources 'ac-sources-semantic))

(add-hook 'c-mode-common-hook 'my:add-semantic-to-autocomplete)

From this video here.But for me it does not work at all.Save me please,i lost all day fighting with it...

1
  • Have you installed auto-complete? Please try to detail what you do, what you expect and what happens instead.
    – JeanPierre
    Commented Feb 18, 2016 at 16:18

1 Answer 1

0

You mistyped your auto-complete source symbol.

It should be 'ac-source-semantic, not 'ac-source(S)-semantic

4
  • I'm such an idiot,thank you very much tho,appreciate your help. Commented Feb 18, 2016 at 16:47
  • What do you think about irony mode,is it the best mode for c/c++? Commented Feb 18, 2016 at 16:50
  • I have not used it, I use company-clang with flycheck. However, I do not frequently write C or C++ so my knowledge of what is best is limited. Commented Feb 18, 2016 at 17:12
  • Not fly-make? @Jordon Biondo Commented Feb 18, 2016 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.