src/Pure/System/isar.ML
changeset 37216 3165bc303f66
parent 36953 2af1ad9aa1a3
child 37239 54b444874be1
equal deleted inserted replaced
37215:91dfe7dccfdf 37216:3165bc303f66
    70 
    70 
    71 local
    71 local
    72 
    72 
    73 fun find_and_undo _ [] = error "Undo history exhausted"
    73 fun find_and_undo _ [] = error "Undo history exhausted"
    74   | find_and_undo which ((prev, tr) :: hist) =
    74   | find_and_undo which ((prev, tr) :: hist) =
    75       ((case Toplevel.init_of tr of SOME name => ThyInfo.kill_thy name | NONE => ());
    75       ((case Toplevel.init_of tr of SOME name => Thy_Info.kill_thy name | NONE => ());
    76         if which (Toplevel.name_of tr) then (prev, hist) else find_and_undo which hist);
    76         if which (Toplevel.name_of tr) then (prev, hist) else find_and_undo which hist);
    77 
    77 
    78 in
    78 in
    79 
    79 
    80 fun linear_undo n = edit_history n (K (find_and_undo (K true)));
    80 fun linear_undo n = edit_history n (K (find_and_undo (K true)));