aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/lib.ml
diff options
context:
space:
mode:
Diffstat (limited to 'library/lib.ml')
-rw-r--r--library/lib.ml19
1 files changed, 3 insertions, 16 deletions
diff --git a/library/lib.ml b/library/lib.ml
index f6b25e201..cfaea3b66 100644
--- a/library/lib.ml
+++ b/library/lib.ml
@@ -553,13 +553,6 @@ let recache_context ctx =
let is_frozen_state = function (_,FrozenState _) -> true | _ -> false
-let has_top_frozen_state () =
- let rec aux = function
- | (sp, FrozenState _)::_ -> Some sp
- | (sp, Leaf o)::t when object_tag o = "DOT" -> aux t
- | _ -> None
- in aux !lib_stk
-
let set_lib_stk new_lib_stk =
lib_stk := new_lib_stk;
recalc_path_prefix ();
@@ -579,14 +572,6 @@ let reset_to_gen test =
let reset_to sp = reset_to_gen (fun x -> fst x = sp)
-let reset_to_state sp =
- let (_,eq,before) = split_lib sp in
- (* if eq a frozen state, we'll reset to it *)
- match eq with
- | [_,FrozenState f] -> lib_stk := eq@before; recalc_path_prefix (); unfreeze_summaries f
- | _ -> error "Not a frozen state"
-
-
(* LEM: TODO
* We will need to muck with frozen states in after, too!
* Not only FrozenState, but also those embedded in Opened(Section|Module)
@@ -677,7 +662,9 @@ let rec back_stk n stk =
| _::tail -> back_stk n tail
| [] -> error "Reached begin of command history"
-let back n = reset_to (back_stk n !lib_stk)
+let back n =
+ reset_to (back_stk n !lib_stk);
+ set_command_label (current_command_label () - n - 1)
(* State and initialization. *)