src/Pure/ProofGeneral/proof_general_emacs.ML
changeset 48646 91281e9472d8
parent 46961 5c6955f487e5
child 49358 0fa351b1bd14
equal deleted inserted replaced
48645:33f00ce23e63 48646:91281e9472d8
   187 
   187 
   188 
   188 
   189 (* additional outer syntax for Isar *)
   189 (* additional outer syntax for Isar *)
   190 
   190 
   191 val _ =
   191 val _ =
   192   Outer_Syntax.improper_command ("ProofGeneral.pr", Keyword.diag) "print state (internal)"
   192   Outer_Syntax.improper_command
       
   193     (("ProofGeneral.pr", Keyword.diag), Position.none) "print state (internal)"
   193     (Scan.succeed (Toplevel.no_timing o Toplevel.keep (fn state =>
   194     (Scan.succeed (Toplevel.no_timing o Toplevel.keep (fn state =>
   194       if Toplevel.is_toplevel state orelse Toplevel.is_theory state then tell_clear_goals ()
   195       if Toplevel.is_toplevel state orelse Toplevel.is_theory state then tell_clear_goals ()
   195       else (Toplevel.quiet := false; Toplevel.print_state true state))));
   196       else (Toplevel.quiet := false; Toplevel.print_state true state))));
   196 
   197 
   197 val _ = (*undo without output -- historical*)
   198 val _ = (*undo without output -- historical*)
   198   Outer_Syntax.improper_command ("ProofGeneral.undo", Keyword.control) "(internal)"
   199   Outer_Syntax.improper_command
       
   200     (("ProofGeneral.undo", Keyword.control), Position.none) "(internal)"
   199     (Scan.succeed (Toplevel.no_timing o Toplevel.imperative (fn () => Isar.undo 1)));
   201     (Scan.succeed (Toplevel.no_timing o Toplevel.imperative (fn () => Isar.undo 1)));
   200 
   202 
   201 val _ =
   203 val _ =
   202   Outer_Syntax.improper_command ("ProofGeneral.restart", Keyword.control) "(internal)"
   204   Outer_Syntax.improper_command
       
   205     (("ProofGeneral.restart", Keyword.control), Position.none) "(internal)"
   203     (Parse.opt_unit >> (Toplevel.no_timing oo K (Toplevel.imperative restart)));
   206     (Parse.opt_unit >> (Toplevel.no_timing oo K (Toplevel.imperative restart)));
   204 
   207 
   205 val _ =
   208 val _ =
   206   Outer_Syntax.improper_command ("ProofGeneral.kill_proof", Keyword.control) "(internal)"
   209   Outer_Syntax.improper_command
       
   210     (("ProofGeneral.kill_proof", Keyword.control), Position.none) "(internal)"
   207     (Scan.succeed (Toplevel.no_timing o
   211     (Scan.succeed (Toplevel.no_timing o
   208       Toplevel.imperative (fn () => (Isar.kill_proof (); tell_clear_goals ()))));
   212       Toplevel.imperative (fn () => (Isar.kill_proof (); tell_clear_goals ()))));
   209 
   213 
   210 val _ =
   214 val _ =
   211   Outer_Syntax.improper_command ("ProofGeneral.inform_file_processed", Keyword.control) "(internal)"
   215   Outer_Syntax.improper_command
       
   216     (("ProofGeneral.inform_file_processed", Keyword.control), Position.none) "(internal)"
   212     (Parse.name >> (fn file =>
   217     (Parse.name >> (fn file =>
   213       Toplevel.no_timing o Toplevel.imperative (fn () => inform_file_processed file)));
   218       Toplevel.no_timing o Toplevel.imperative (fn () => inform_file_processed file)));
   214 
   219 
   215 val _ =
   220 val _ =
   216   Outer_Syntax.improper_command ("ProofGeneral.inform_file_retracted", Keyword.control) "(internal)"
   221   Outer_Syntax.improper_command
       
   222     (("ProofGeneral.inform_file_retracted", Keyword.control), Position.none) "(internal)"
   217     (Parse.name >> (Toplevel.no_timing oo
   223     (Parse.name >> (Toplevel.no_timing oo
   218       (fn file => Toplevel.imperative (fn () => inform_file_retracted file))));
   224       (fn file => Toplevel.imperative (fn () => inform_file_retracted file))));
   219 
   225 
   220 
   226 
   221 (* init *)
   227 (* init *)