abo-abo / function-args

C++ completion for GNU Emacs
120 stars 10 forks source link

Calling (semantic-mode 1) at mode setup causes warnings #13

Closed reiver-dev closed 9 years ago

reiver-dev commented 10 years ago

The same issue is described here: http://stackoverflow.com/questions/13220980/strange-semantic-error

WARNING: semantic-find-file-noselect called for /usr/include/c++/4.9.1/x86_64-unknown-linux-gnu/bits/os_defines.h while in set-auto-mode for /usr/include/c++/4.9.1/x86_64-unknown-linux-gnu/bits/os_defines.h.  You should call the responsible function into `mode-local-init-hook'.
WARNING: semantic-find-file-noselect called for /usr/include/c++/4.9.1/x86_64-unknown-linux-gnu/bits/cpu_defines.h while in set-auto-mode for /usr/include/c++/4.9.1/x86_64-unknown-linux-gnu/bits/cpu_defines.h.  You should call the responsible function into `mode-local-init-hook'.
WARNING: semantic-find-file-noselect called for /usr/include/features.h while in set-auto-mode for /usr/include/features.h.  You should call the responsible function into ...

I am using buildin cedet/semantic in emacs 24.3.

(add-to-list 'semantic-default-submodes 'global-semantic-decoration-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-local-symbol-highlight-mode)

(semantic-mode t)

My current workaround is to redefine function-args-mode without (semantic-mode 1) expression as i already have that in my init.el.

Maybe module implementation should just check whether semantic mode is enabled and disable itself with warning otherwise.

abo-abo commented 10 years ago

This issue appears to do with a faulty CEDET config, just like in the stackoverflow question.

Since function-args-mode relies on semantic-mode to be on and will likely throw an error "Cannot analyze buffers not supported by Semantic" if semantic is off.

I suggest that you try either try to fix your CEDET config as in the stack question, or switch to the newest CEDET from the git mirror http://git.randomsample.de/cedet.git. That's what I'm using since it has many fixes and is faster.