Hi Eric,

Thank you, this is exactly what I need and works well. Sometimes the simplest things are right under ones nose.

The reason I need is that I am working on the code for wisent-php at intervals and then use the updates work.

Its not so much bad parsing, rather it is my bad elisp skills. :-) Periodically some rather odd things are passed to semantic-tag-expand-function for example and this triggers an error, which I do not always have time to fix.


Many thanks,
Mike


















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
(www.centreforcommunicationrights.org)















-----Original Message-----




























From: Eric M. Ludlam [mailto:eric@siege-engine.com]
Sent: Fri 4/17/2009 4:46 PM
To: Mike Rowse
Cc: cedet-devel@lists.sourceforge.net
Subject: Re[1]: Turn off semantic parsing for a buffer

Hi,

  It should be fine to edit code that Semantic cannot parse.  Is there
something that it is doing that makes Emacs not usable?  If so, I'd
rather fix that problem.

  For a quick fix, you can just disable the idle scheduler for that
buffer:

M-x semantic-idle-scheduler-mode

 In just that buffer.  I haven't tried that in a long time though so
I'm not certain what all the consequences are.  You could also disable
it globally.  Most things can be enabled/disabled on a per-buffer
basis independently of Semantic's parser installation state.  It
should be possible to find the offender, and disable it.

Eric

>>> "Mike Rowse" <MR@waccglobal.org> seems to think that:
>Hi Eric,=20
>
>I sent this along to cedet-devel, but I think it may have been eaten up =
>by a spam filter.=20
  [ ... ]
>-----Original Message-----=20
>
>
>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
>=20
>Hi ,=20
>
>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.=20
>
>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,=20
>Mike
>