aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-03-30 11:15:40 +0200
committerPierre-Marie Pédrot2016-03-30 11:18:41 +0200
commit5b412e9968d93f6f52ed738fd01a74e7021d1dd4 (patch)
tree61190a49e43a750a4147b2b748ae78fb0e21374b /stm
parentd670c6b6ceab80f1c3b6b74ffb53579670c0e621 (diff)
parentdc36fd7fe118136277d8dc525c528fef38b46d70 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'stm')
-rw-r--r--stm/lemmas.ml10
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)
+