help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How correct setup semantic include path?


From: Oleksandr Gavenko
Subject: How correct setup semantic include path?
Date: Fri, 27 Aug 2010 14:00:18 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

I use Emacs 23.2 which include Semantic.

My first attempt is put to .emacs:

  (semantic-add-system-include "~/.emacs.d/include" 'c-mode)
  (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)
  (global-semanticdb-minor-mode 1)

But 'semantic-dependency-system-include-path' in .c file has value
("/usr/include") and completion, goto declaretion not worked.

Then I try:

  (add-hook 'c-mode-hook
(lambda () (semantic-add-system-include "~/.emacs.d/include" 'c-mode)))
  (add-hook 'c++-mode-hook
(lambda () (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)))

In this case all ok but not for first visited .c file.

To workaround this issue I just 'revert-buffer'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]