emacs-devel
[Top][All Lists]
Advanced

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

Re: CEDET merge


From: Eric M. Ludlam
Subject: Re: CEDET merge
Date: Thu, 01 Oct 2009 07:31:02 -0400

On Thu, 2009-10-01 at 12:58 +0900, Miles Bader wrote:
> Chong Yidong <address@hidden> writes:
> (2)
> I get the following error with semantic-mode:
> 
>    (a) visit the following source file:
> 
> ---- cut here ----
> #include <stdio.h>
> 
> int main ()
> {
>   printf ("hello world\n");
>   return 0;
> }
> ---- cut here ----
> 
>    (b) do M-x semantic-mode
> 
>    (c) position point after "printf"
> 
>    (d) use the command: "C-c , j"
>        (I don't even know what that command does, but it gets an error...)
> 
>    (e) I get the following error/backtrace:
> 
> Debugger entered--Lisp error: (wrong-type-argument syntax-table-p nil)        
>   
>   set-syntax-table(nil)                                                       
>   
>   semantic-ctxt-current-symbol-default(nil)                                   
>   
>   semantic-ctxt-current-symbol()                                              
>   
>   semantic-ctxt-current-thing()                                               
>   
>   semantic-complete-default-to-tag(nil)                                       
>   
>   semantic-complete-read-tag-engine([object semantic-collector-buffer-deep 
> "Sym$
>   semantic-complete-read-tag-buffer-deep("Symbol: ")                          
>   
>   semantic-complete-jump-local()                                              
>   
>   call-interactively(semantic-complete-jump-local nil nil)                    
>   

I haven't had the opportunity to use the Emacs/CEDET merged version, but
I can provide some help here.  The Semantic configuration was setup to
be done in a .emacs file, or very early on, and all the necessary setup
is done in mode hooks after that.  If you load in a C file, then turn on
Semantic, then your current buffer will not have the right variables
setup.  In this case, it is a variable that tweaks the syntax table.

I think the right order would be

M-x semantic-mode

;; create the file

continue with above script.

I would guess that the new semantic-mode should either warn on
pre-existing buffers, or find a way to apply itself to pre-existing
buffers.  The standalone CEDET install works around this by the file
that loads CEDET doing these installs in your .emacs file.  The
assumption being that if you installed CEDET, you want this stuff on,
which is not the case for Emacs.

Eric




reply via email to

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