diff options
| author | pboutill | 2012-08-05 23:13:04 +0000 |
|---|---|---|
| committer | pboutill | 2012-08-05 23:13:04 +0000 |
| commit | 3a6650a4adcef0bf8c8afb316c227b4aa21d560e (patch) | |
| tree | 825efe8441ca12d1b99806a12e62561974318df7 | |
| parent | 8fdcd68a1cd1c2b711e3c224b3556851cb675240 (diff) | |
Dump references in Reset
Patch by Adam Chilipala.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15677 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | toplevel/vernacentries.ml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index 011818c15e..46fdeb5326 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -1466,6 +1466,22 @@ let vernac_back n = let vernac_reset_name id = try + let globalized = + try + let gr = Smartlocate.global_with_alias (Ident id) in + Dumpglob.add_glob (fst id) gr; + true + with _ -> false in + + if not globalized then begin + try begin match Lib.find_opening_node (snd id) with + | Lib.OpenedSection _ -> Dumpglob.dump_reference (fst id) + (string_of_dirpath (Lib.current_dirpath true)) "<>" "sec"; + (* Might be nice to implement module cases, too.... *) + | _ -> () + end with UserError _ -> () + end; + if Backtrack.is_active () then (Backtrack.reset_name id; try_print_subgoals ()) else |
