I would like that every time I open a .cpp file, semantic tag-folding would become activated. I am using the latest version of cedet (loading cedet-devel-load.el). I have
(semantic-mode 1)
(require 'semantic/ia)
(require 'semantic/bovine/gcc)
(load-file "path/to/semantic/tag/folding/semantic-tag-folding.el")
(require 'semantic-tag-folding)
I added a hook
(add-hook 'c-mode-common-hook 'setupcpp)
and in 'setupcpp I simply have
(defun setupcpp ()
(interactive)
(semantic-tag-folding-mode t))
Nothing related to cedet/semantic happens after this in my .emacs. In fact, I could make this the only content of my .emacs.
It doesn't work. When opening a .cpp file I get the message File mode specification error: (error "Buffer foo.cpp cannot be folded by semantic").
Weirdly enough, if, once the file is open, I do M-x semantic-tag-folding-mode, it works! I am just lost.