I started semantic according to the INSTALL. Below is my .emacs. But I still get the same failed message.

If I uncomment (semantic-mode 1) in the .emacs file, I will get the " Autoloading failed to define function          semantic-mode"

Message at emacs initialization.


By the way, how can I go into semantic mode if I dont use "Tool->Source Code Parser" or "M-x semantic-mode"?



;;(load-file "~/emacs-23.4/lisp/cedet/cedet.el")

(load-file "~/cedet-dev/cedet/common/cedet.el")

(require 'cedet)

(setq semanticdb-default-save-directory "E:\\emacs_doc\\ecb_temp")


(global-ede-mode t)                      ; Enable the Project management system



;;(semantic-mode 1)


(semantic-load-enable-code-helpers)      ; Enable prototype help and smart completion


(global-srecode-minor-mode 1)            ; Enable template insertion menu


(setq default-major-mode 'c-mode)

(setq inhibit-startup-message t)


(column-number-mode t)

(global-set-key (kbd "C-SPC") 'nil)

(global-set-key (kbd "C-x C-c") 'nil)


(setq indent-tabs-mod 'nil)

(setq make-backup-files nil)

(setq global-font-lock-mode t)

(setq compile-command "make")


;;(add-to-list 'load-path "~/ecb-snap")

;;(require 'ecb)

;;(require 'ecb-autoloads)


;; key binding

(global-set-key [f9] 'compile)

;;(global-set-key [f8] 'ecb-activate)

;;(global-set-key [C-f8] 'ecb-deactivate) (global-set-key [f2] 'global-font-lock-mode)



发件人: Eric M. Ludlam [mailto:ericludlam@gmail.com]

发送时间: 201237日星期三 12:27

收件人: cedet-semantic@lists.sourceforge.net

主题: Re: [cedet-semantic] Autoloading failed to define function semantic-mode


On 03/06/2012 11:11 PM, shuyu_1982@sohu.com wrote:

> Hi all. Iam new to cedet.


> I am using emacs 23.4 under Windows XP SP3.


> I checkouted the devel-version CEDET from

> bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk.


> Compiled it.


> When I opened a C++ or C source file, I try to enable Semantic mode

> using Tools->Source Code Parsers (Semantic),


> I get this message Autoloading failed to define function semantic-mode

> from emacs, and semantic doesnt work.


> I tried to google the problem, cannot find any solution.


> Can anyone help me?


> Thanks a lot.




The semantic in CEDET/trunk uses a different install method than the one in Emacs.  The Emacs menu item from "tools" should be avoided if you use trunk.  Instead see the INSTALL file for code to add to your .emacs file get Semantic started.


We will eventually switch to using the same function name and file name format as Emacs which will make using those menus work, but this has not yet happened.





Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.



cedet-semantic mailing list