Skip to content

Commit

Permalink
coq: clear goals buffer after admitted
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriktews committed Mar 22, 2024
1 parent e793ac4 commit 0602ccc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion ci/simple-tests/test-goals-present.el
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ goals buffer is not empty afterwards."
(goals-after-test coq-src-error "error"))

(ert-deftest goals-reset-after-admitted ()
:expected-result :failed
"The goals buffer is reset after an Admitted."
(message
"goals-reset-after-admitted: Check that goals are reset after Admitted.")
Expand Down
13 changes: 11 additions & 2 deletions coq/coq.el
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,17 @@ Namely, goals that do not fit in the goals window."
;; "Add LoadPath \"%s\"." ;; fixes unadorned Require (if .vo exists).
"*Command of the inferior process to change the directory.")

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

(defvar coq-goal-regexp
"\\(============================\\)\\|\\(\\(?:sub\\)?goal [0-9]+\\)\n")
Expand Down
1 change: 1 addition & 0 deletions generic/proof-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
;; proof-shell-filter-wrapper
;; -> proof-shell-filter
;; -> proof-shell-process-urgent-messages
;; -> proof-shell-process-urgent-message
;; -> proof-shell-filter-manage-output
;; -> proof-shell-handle-immediate-output
;; -> proof-shell-exec-loop
Expand Down

0 comments on commit 0602ccc

Please sign in to comment.