Hi Eric,
I sent this along to cedet-devel, but I think it may have been eaten up by a spam filter.
Cheers,
Mike
-----Original Message-----
From: Mike Rowse
Sent: Thu 4/16/2009 12:53 PM
To: cedet-devel@lists.sourceforge.net
Subject: Turn off semantic parsing for a buffer
Hi ,
I am wondering what the easiest way is to turn off semantic parsing for a buffer? I have php files that have parsing errors that I do not always have time to fix in a given moment. It would be nice to be able to continue working on parse-able files with CEDET/Semantic along side un-parse-able files.
I tried to do the following:
(defun php-mode-no-cedet()
"A hack way to load a file in php-mode without CEDET"
(interactive)
(fundamental-mode)
(make-local-variable 'php-mode-hook)
(make-local-variable 'c-mode-hook)
(remove-hook 'php-mode-hook #'wisent-php-default-setup t)
(remove-hook 'c-mode-hook 'semantic-default-c-setup t)
(php-mode)
)
When I EDEBUG this function it appears to remove the wisent-php function from a buffer-local version. Semantic kicks right back again (with determination and persistence :-) ). I am baffled, I suspect it may have to do with the idle parser or compiled code somewhere. I figure there must be an easier way, but it is not obvious to me.
Many thanks,
Mike