X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2FmatitaGui.ml;h=ed5582a16addba81466f650b03db99cbe9164afc;hb=e8b02b0b19274bb9c486987e401d637dc045b272;hp=7db4d5af12bcb3a5bbf8074f69a09282d41d5e60;hpb=a850f7bd35147a327c26330447c3d1748a449d09;p=helm.git diff --git a/helm/software/matita/matitaGui.ml b/helm/software/matita/matitaGui.ml index 7db4d5af1..ed5582a16 100644 --- a/helm/software/matita/matitaGui.ml +++ b/helm/software/matita/matitaGui.ml @@ -201,6 +201,7 @@ class interpErrorModel = tree_store#get ~row:iter ~column:interp_no_col end +exception UseLibrary;; let rec interactive_error_interp ~all_passes (source_buffer:GSourceView.source_buffer) notify_exn offset errorll filename @@ -347,9 +348,7 @@ let rec interactive_error_interp ~all_passes return () ); connect_button dialog#disambiguationErrorsMoreErrors - (fun _ -> return () ; - interactive_error_interp ~all_passes:true source_buffer - notify_exn offset errorll filename); + (fun _ -> return () ; raise UseLibrary); connect_button dialog#disambiguationErrorsCancelButton fail; dialog#disambiguationErrors#show (); GtkThread.main () @@ -702,8 +701,11 @@ class gui () = let thread_main = fun () -> lock_world (); + let saved_use_library= !MultiPassDisambiguator.use_library in try + MultiPassDisambiguator.use_library := !all_disambiguation_passes; f (); + MultiPassDisambiguator.use_library := saved_use_library; unlock_world () with | MultiPassDisambiguator.DisambiguationError (offset,errorll) -> @@ -712,7 +714,17 @@ class gui () = ~all_passes:!all_disambiguation_passes source_buffer notify_exn offset errorll (s())#filename with - exc -> notify_exn exc); + | UseLibrary -> + MultiPassDisambiguator.use_library := true; + (try f () + with + | MultiPassDisambiguator.DisambiguationError (offset,errorll) -> + interactive_error_interp ~all_passes:true source_buffer + notify_exn offset errorll (s())#filename + | exc -> + notify_exn exc); + | exc -> notify_exn exc); + MultiPassDisambiguator.use_library := saved_use_library; unlock_world () | exc -> notify_exn exc;