Error when using with "which-function-mode"
tuhdo opened this issue · 4 comments
Here are the steps to reproduce this issue:
- Start fresh Emacs: emacs -q
- Install
function-args
via MELPA or manually. - Paste the following configuration in
*scratch*
:
(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)
- Eval
*scratch*
- Copy these two files to your computer (pastebin links):
- Open
coloring_solver.c
- Move the cursor to the word
Answer
on line 8. - Execute
semantic-ia-fast-jump
. - Error:
Wrong type argument: stringp, (((0) "Answer"))
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.
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:)
Well, I missed that ruby one.
Anyway, the versions are:
- Emacs:
GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-05-03 on tuhdo-MacBookAir
- CEDET on github: https://github.com/emacsmirror/cedet
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.
Are you able to reproduce it? Please let me know, and I will drop a gif screenshot.
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.