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"

  (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)



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,

The World Association for Christian Communication is a UK Registered Charity (number 296073) and a Company registered in England and Wales (number 2082273) with its Registered Office at 71 Lambeth Walk, London SE11 6DX. It is an incorporated Charitable Organisation in Canada (number 83970 9524 RR0001) with its offices at 308 Main Street, Toronto ON, M4C 4X7.
Visit WACC's latest initiative: Centre for Communication Rights