X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2FmatitaScript.ml;h=718ea7a23f64091e05642560ff4ce094d122b857;hb=c09f706392d4a15d78bbe216dc0b5b7c8d41a1f8;hp=5674063e990293482d63d754f50e49d29eaf4998;hpb=14d7eabdb425c4dbcda5de18fac0735fde5d176b;p=helm.git diff --git a/helm/software/matita/matitaScript.ml b/helm/software/matita/matitaScript.ml index 5674063e9..718ea7a23 100644 --- a/helm/software/matita/matitaScript.ml +++ b/helm/software/matita/matitaScript.ml @@ -129,11 +129,11 @@ let wrap_with_developments guistuff f arg = (ActionCancelled ("Internal error: "^f_pwd^" exists but I'm unable to include it!")) in - let handle_with_devel d lexiconfile exc = + let handle_with_devel d lexiconfile mafile exc = let name = MatitamakeLib.name_for_development d in let title = "Unable to include " ^ lexiconfile in let message = - lexiconfile ^ " is handled by development " ^ name ^ ".\n\n" ^ + mafile ^ " is handled by development " ^ name ^ ".\n\n" ^ "Should I compile it and Its dependencies?" in (match guistuff.ask_confirmation ~title ~message with @@ -170,7 +170,7 @@ let wrap_with_developments guistuff f arg = * but was unable to get the compilation output 'xfilename' *) match MatitamakeLib.development_for_dir (Filename.dirname mafilename) with | None -> handle_without_devel mafilename exn - | Some d -> handle_with_devel d xfilename exn + | Some d -> handle_with_devel d xfilename mafilename exn ;; let eval_with_engine @@ -288,11 +288,6 @@ let rec eval_macro include_paths (buffer : GText.buffer) guistuff lexicon_status let t_and_ty = Cic.Cast (term,ty) in guistuff.mathviewer#show_entry (`Cic (t_and_ty,metasenv)); [], parsed_text_length - (* TODO *) - | TA.Quit _ -> failwith "not implemented" - | TA.Print (_,kind) -> failwith "not implemented" - | TA.Search_pat (_, search_kind, str) -> failwith "not implemented" - | TA.Search_term (_, search_kind, term) -> failwith "not implemented" and eval_executable include_paths (buffer : GText.buffer) guistuff lexicon_status grafite_status user_goal unparsed_text skipped_txt nonskipped_txt @@ -588,6 +583,11 @@ object (self) let grafite_status = self#grafite_status in List.iter (fun o -> o lexicon_status grafite_status) observers + method loadFromString s = + buffer#set_text s; + self#reset_buffer; + buffer#set_modified true + method loadFromFile f = buffer#set_text (HExtlib.input_file f); self#reset_buffer;