diff options
Diffstat (limited to 'stm')
| -rw-r--r-- | stm/lemmas.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/stm/lemmas.ml b/stm/lemmas.ml index ac54028eb7..80b3fef196 100644 --- a/stm/lemmas.ml +++ b/stm/lemmas.ml @@ -522,5 +522,11 @@ let save_proof ?proof = function let get_current_context () = try Pfedit.get_current_goal_context () with e when Logic.catchable_exception e -> - let env = Global.env () in - (Evd.from_env env, env) + try (* No more focused goals ? *) + let p = Pfedit.get_pftreestate () in + let evd = Proof.in_proof p (fun x -> x) in + (evd, Global.env ()) + with Proof_global.NoCurrentProof -> + let env = Global.env () in + (Evd.from_env env, env) + |
