Hi,
I think your best bet is to modify the auto-mode-alist to make .pan
files go into c++ mode.
(add-to-list 'auto-mode-alist '("\\.pan$" . c++-mode))
That should solve the problem.
Good Luck
Eric
>>> Jonathan Emmett <jonathan.emmett@...> seems to think that:
[ ... ]
>>>- Next I tried semantic-ia-complete-symbol and now I'm getting "No
>>>method definition: semanticdb-needs-refresh-p (nil)". Since I had no
>>>better ideas, I tried nuking my semantic caches but it didn't help.
>>>
>>>I haven't had the time to dig any deeper yet, nor to build a newer
>>>emacs, but I thought I'd send off these few issues now and dig more later.
>>
>> [ ... ]
>>
>> Hmmm, curious. I'd be curious to see a stack trace.
>> M-x toggle-debug-on-error RET
>>
>> My investigations showed a different error I need to look into when
>> semantic-ia-complete-symbol is already on a complete symbol.
>>
>
>Here's the stack trace. I think I've found a starting point but I
>haven't investigated further: it works just fine when my header file is
>a ".h" file in C mode. But unfortunately, it is not. When it's a
>".pan" in fundamental mode I get this. Opening up the .pan file and
>manually switching to c mode causes it to work, but there is some
>interesting behaviour here.
>
> What I did to test this was put a struct definition in the .pan file
>and then I have a c file which includes this .pan file and declares a
>variable of that structure type. I then use semantic-ia-complete-symbol
>to try to complete a field in that struct.
>
>- If I load just the .c file and attempt a completion I get the "no
>method defintion" error.
>
>- If I then switch to the .pan file (which was loaded by the attempt to
>complete the symbol) and change it to C mode, then switch back to the c
>file, I no longer get the error when I try to complete -- but I don't
>get the correct completion either, it gives me argc, argv, and other
>things like that.
>
>- But, if I switch the .pan file to c mode before attempting any
>completions, everything is just fine. I just don't know what bits of
>state I need to clear out in order to reset things when I get stuck in
>the 2nd mode above.
>
>Anyway, here's the trace. It appears to my untrained eye that the
>culprit is semanticdb-file-table-object.
>
>Debugger entered--Lisp error: (no-method-definition
>semanticdb-needs-refresh-p (nil))
> signal(no-method-definition (semanticdb-needs-refresh-p (nil)))
> eieio-generic-call(semanticdb-needs-refresh-p (nil))
> semanticdb-needs-refresh-p(nil)
> semanticdb-file-table-object("test.pan")
[ ... ]
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|