Re: [cedet-semantic] Wisent grammar compilation sometimes unsuccessful.
Brought to you by:
zappo
From: David P. <dav...@wa...> - 2004-02-20 12:46:47
|
Eric, [...] >>I must confess that this problem often occurs after I entered the >>debugger. So probably it is due to a bad interaction between `debug' >>and the various hooks and timers semantic uses. >> >>Perhaps it is the problem Joseph has had too, as it seems he has often >>used the Lisp debugger recently ;-) > > [ ... ] > > Do you think a trick like this might be a quick fix?! Yes it could be useful. However I am not sure the debugger is really the problem. I investigated a little more on this issue and found that in some cases, after the parse tree state has been set to "unparseable" it is not correctly reset to "needs-update" after the buffer is modified again. Thus disabling re-parse. Here is a little patch I applied to semantic-edit.el that seems to have cured the problem for me. Does it look good for you? David 2004-02-20 David Ponce <da...@dp...> * cedet/semantic/semantic-edit.el (semantic-edits-change-function-handle-changes): Set the parse tree state to needs-update on every change. Index: semantic-edit.el =================================================================== RCS file: /cvsroot/cedet/cedet/semantic/semantic-edit.el,v retrieving revision 1.22 diff -c -r1.22 semantic-edit.el *** semantic-edit.el 16 Sep 2003 19:05:57 -0000 1.22 --- semantic-edit.el 20 Feb 2004 12:29:08 -0000 *************** *** 148,157 **** ;; into one overlay. (let ((changes-in-change (semantic-changes-in-region (1- start) (1+ end))) ) (if (not changes-in-change) (let ((o (semantic-make-overlay start end))) (semantic-overlay-put o 'semantic-change t) - (semantic-parse-tree-set-needs-update) ;; Run the hooks safely. When hooks blow it, our dirty ;; function will be removed from the list of active change ;; functions. --- 148,157 ---- ;; into one overlay. (let ((changes-in-change (semantic-changes-in-region (1- start) (1+ end))) ) + (semantic-parse-tree-set-needs-update) (if (not changes-in-change) (let ((o (semantic-make-overlay start end))) (semantic-overlay-put o 'semantic-change t) ;; Run the hooks safely. When hooks blow it, our dirty ;; function will be removed from the list of active change ;; functions. |