equal
deleted
inserted
replaced
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))); |