src/Pure/ProofGeneral/proof_general_emacs.ML
changeset 27535 518380d43585
parent 27532 f3d92b5dcd45
child 27536 1dcb8a6bdfe9
equal deleted inserted replaced
27534:048294b251ee 27535:518380d43585
   202 
   202 
   203 local structure P = OuterParse and K = OuterKeyword in
   203 local structure P = OuterParse and K = OuterKeyword in
   204 
   204 
   205 fun undoP () = (*undo without output -- historical*)
   205 fun undoP () = (*undo without output -- historical*)
   206   OuterSyntax.improper_command "ProofGeneral.undo" "(internal)" K.control
   206   OuterSyntax.improper_command "ProofGeneral.undo" "(internal)" K.control
   207     (Scan.succeed (Toplevel.no_timing o IsarCmd.undo));
   207     (Scan.succeed (Toplevel.no_timing o Toplevel.imperative (fn () => Isar.undo 1)));
   208 
   208 
   209 fun restartP () =
   209 fun restartP () =
   210   OuterSyntax.improper_command "ProofGeneral.restart" "(internal)" K.control
   210   OuterSyntax.improper_command "ProofGeneral.restart" "(internal)" K.control
   211     (P.opt_unit >> (Toplevel.no_timing oo K (Toplevel.imperative restart)));
   211     (P.opt_unit >> (Toplevel.no_timing oo K (Toplevel.imperative restart)));
   212 
   212 
   213 fun kill_proofP () =
   213 fun kill_proofP () =
   214   OuterSyntax.improper_command "ProofGeneral.kill_proof" "(internal)" K.control
   214   OuterSyntax.improper_command "ProofGeneral.kill_proof" "(internal)" K.control
   215     (Scan.succeed (Toplevel.no_timing o IsarCmd.kill_proof_notify tell_clear_goals));
       
   216 
       
   217 fun isar_kill_proofP () =
       
   218   OuterSyntax.improper_command "ProofGeneral.isar_kill_proof" "(internal)" K.control
       
   219     (Scan.succeed (Toplevel.no_timing o
   215     (Scan.succeed (Toplevel.no_timing o
   220       Toplevel.imperative (fn () => (Isar.kill_proof (); tell_clear_goals ()))));
   216       Toplevel.imperative (fn () => (Isar.kill_proof (); tell_clear_goals ()))));
   221 
   217 
   222 fun inform_file_processedP () =
   218 fun inform_file_processedP () =
   223   OuterSyntax.improper_command "ProofGeneral.inform_file_processed" "(internal)" K.control
   219   OuterSyntax.improper_command "ProofGeneral.inform_file_processed" "(internal)" K.control
   236   OuterSyntax.improper_command "ProofGeneral.process_pgip" "(internal)" K.control
   232   OuterSyntax.improper_command "ProofGeneral.process_pgip" "(internal)" K.control
   237     (P.text >> (Toplevel.no_timing oo
   233     (P.text >> (Toplevel.no_timing oo
   238       (fn txt => Toplevel.imperative (fn () => ProofGeneralPgip.process_pgip txt))));
   234       (fn txt => Toplevel.imperative (fn () => ProofGeneralPgip.process_pgip txt))));
   239 
   235 
   240 fun init_outer_syntax () = List.app (fn f => f ())
   236 fun init_outer_syntax () = List.app (fn f => f ())
   241   [undoP, restartP, kill_proofP, isar_kill_proofP, inform_file_processedP,
   237   [undoP, restartP, kill_proofP, inform_file_processedP, inform_file_retractedP, process_pgipP];
   242     inform_file_retractedP, process_pgipP];
       
   243 
   238 
   244 end;
   239 end;
   245 
   240 
   246 
   241 
   247 (* init *)
   242 (* init *)