Toplevel.proof_position_of;
authorwenzelm
Thu, 05 Jan 2006 22:29:58 +0100
changeset 18587 d4dcdfd764a0
parent 18586 588e80289658
child 18588 ff9d9bbae8f3
Toplevel.proof_position_of;
src/Pure/proof_general.ML
--- a/src/Pure/proof_general.ML	Thu Jan 05 22:29:57 2006 +0100
+++ b/src/Pure/proof_general.ML	Thu Jan 05 22:29:58 2006 +0100
@@ -1196,9 +1196,7 @@
            current_working_dir := SOME dir)
   end
 
-  val topnode = Toplevel.node_of o Toplevel.get_state
-  fun topproofpos () = (case topnode() of Toplevel.Proof (h, _) => SOME(ProofHistory.position h)
-                                        | _ => NONE) handle Toplevel.UNDEF => NONE
+  fun topproofpos () = try Toplevel.proof_position_of (Isar.state ());
 in
 
 fun process_pgip_element pgipxml = (case pgipxml of