Skip to content

Commit 0602ccc

Browse files
committed
coq: clear goals buffer after admitted
1 parent e793ac4 commit 0602ccc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

ci/simple-tests/test-goals-present.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ goals buffer is not empty afterwards."
174174
(goals-after-test coq-src-error "error"))
175175

176176
(ert-deftest goals-reset-after-admitted ()
177-
:expected-result :failed
178177
"The goals buffer is reset after an Admitted."
179178
(message
180179
"goals-reset-after-admitted: Check that goals are reset after Admitted.")

coq/coq.el

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,17 @@ Namely, goals that do not fit in the goals window."
145145
;; "Add LoadPath \"%s\"." ;; fixes unadorned Require (if .vo exists).
146146
"*Command of the inferior process to change the directory.")
147147

148-
(defvar coq-shell-proof-completed-regexp "No\\s-+more\\s-+\\(?:sub\\)?goals\\.\\|Subtree\\s-proved!\\|Proof\\s-completed"; \\|This subproof is complete
149-
"*Regular expression indicating that the proof has been completed.")
148+
(defvar coq-shell-proof-completed-regexp
149+
(concat "No\\s-+more\\s-+\\(?:sub\\)?goals\\.\\|Subtree\\s-proved!\\|"
150+
"Proof\\s-completed\\|.*\\s-is\\s-declared"
151+
;; \\|This subproof is complete
152+
)
153+
"*Regular expression indicating that the proof has been completed.
154+
Coq instance of `proof-shell-clear-goals-regexp'. Used in
155+
`proof-shell-process-urgent-message' to determine if the goals
156+
buffer shall be cleaned. Some of the messages recognized here are
157+
not printed by Coq in silent mode, such that Proof General might
158+
fail to delete the goals buffer.")
150159

151160
(defvar coq-goal-regexp
152161
"\\(============================\\)\\|\\(\\(?:sub\\)?goal [0-9]+\\)\n")

generic/proof-shell.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
;; proof-shell-filter-wrapper
3636
;; -> proof-shell-filter
3737
;; -> proof-shell-process-urgent-messages
38+
;; -> proof-shell-process-urgent-message
3839
;; -> proof-shell-filter-manage-output
3940
;; -> proof-shell-handle-immediate-output
4041
;; -> proof-shell-exec-loop

0 commit comments

Comments
 (0)