File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,6 @@ which action the goals buffer should have been reset."
280
280
281
281
(ert-deftest goals-reset-after-admitted ()
282
282
" The goals buffer is reset after an Admitted."
283
- :expected-result :failed
284
283
(goals-buffer-should-get-reset coq-src-admitted " intros P" " Admitted" ))
285
284
286
285
(ert-deftest goals-reset-no-more-goals ()
@@ -289,7 +288,6 @@ which action the goals buffer should have been reset."
289
288
" Lemma a" " no more goals" ))
290
289
291
290
(ert-deftest goals-reset-qed ()
292
- :expected-result :failed
293
291
" The goals buffer is reset after Qed."
294
292
(goals-buffer-should-get-reset coq-src-qed
295
293
" Proof using" " Qed" ))
Original file line number Diff line number Diff line change @@ -3213,8 +3213,15 @@ number of hypothesis displayed, without hiding the goal"
3213
3213
(coq-build-subgoals-string nbgoals nbunfocused)))
3214
3214
minor-mode-alist)))))))
3215
3215
3216
-
3217
-
3216
+ (defun coq-clean-goals-outside-proof ()
3217
+ " Clear goals buffer outside proofs.
3218
+ This function ensures that the goals buffer is reset after Qed or
3219
+ Admitted. This function is for
3220
+ `proof-shell-handle-delayed-output-hook' ."
3221
+ (when (or (not coq-last-but-one-proofstack)
3222
+ (proof-string-match coq-shell-proof-completed-regexp
3223
+ proof-shell-last-output))
3224
+ (proof-clean-buffer proof-goals-buffer)))
3218
3225
3219
3226
3220
3227
; ; This hook must be added before coq-optimise-resp-windows, in order to be evaluated
@@ -3224,10 +3231,7 @@ number of hypothesis displayed, without hiding the goal"
3224
3231
(add-hook 'proof-shell-handle-delayed-output-hook
3225
3232
#'coq-update-minor-mode-alist )
3226
3233
(add-hook 'proof-shell-handle-delayed-output-hook
3227
- (lambda ()
3228
- (if (proof-string-match coq-shell-proof-completed-regexp
3229
- proof-shell-last-output)
3230
- (proof-clean-buffer proof-goals-buffer))))
3234
+ #'coq-clean-goals-outside-proof )
3231
3235
3232
3236
(add-hook 'proof-shell-handle-delayed-output-hook
3233
3237
(lambda ()
You can’t perform that action at this time.
0 commit comments