abo-abo / function-args

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

Error when using with "which-function-mode" #9

Closed tuhdo closed 10 years ago

tuhdo commented 10 years ago

Here are the steps to reproduce this issue:

(require 'function-args)
(fa-config-default)
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
(set-default 'semantic-case-fold t)

(require 'which-func)
(add-to-list 'which-func-modes 'ruby-mode)
(add-to-list 'which-func-modes 'c-mode)
(add-to-list 'which-func-modes 'c++-mode)
(which-function-mode 1)

This won't happen without function-args enabled, but using only (semantic-mode 1). Probably some Semantic settings have problem with which-function-mode and probably there is a bug in Semantic that caused this problem, but at least we can disable this erroneous setting for function-args at least be free of this bug. Then if we can find out about this bug, we can inform the Semantic devs to fix it.

abo-abo commented 10 years ago

As I understood, the error occurs for you when both function-args-mode and which-function-mode are on, but not when only semantic-mode and which-function-mode are on. Is that right?

In any case, I can't reproduce the problem: everything works correctly for me. What's your Emacs version and CEDET version? Also, try to minimize the config, the settings for ruby are completely redundant:)

tuhdo commented 10 years ago

Well, I missed that ruby one.

Anyway, the versions are:

Yes, it happens only when which-function-mode is enabled with function-args. Either can works fine with semantic-mode, but not both at the same time.

tuhdo commented 10 years ago

Are you able to reproduce it? Please let me know, and I will drop a gif screenshot.

tuhdo commented 10 years ago

I found out what was wrong. It is because of the #ifndef _COLORING_SOLVER_H_ / #endif pair that caused this problem. When I removed it, Semantic can jump fine. Probably it will behave better if I create an EDE project with spp-table that defines the macro. This has nothing to do with function-args and Semantic.