aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Courtieu2006-08-24 14:51:46 +0000
committerPierre Courtieu2006-08-24 14:51:46 +0000
commit11befe15a85ab4120bb251be9443d9c0834db3ef (patch)
tree3b70b71a94708752372b26b63fe32e9565d9b673
parent2696e2ec07fea1ca45b19b87046e18643fde9ce1 (diff)
Changed state-preserving check for coq.
-rw-r--r--coq/coq.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/coq/coq.el b/coq/coq.el
index b22edec2..6bf7c453 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -160,6 +160,8 @@ To disable coqc being called (and use only make), set this to nil."
(proof-ids-to-regexp coq-keywords-commands))
(defvar coq-retractable-instruct-regexp
(proof-ids-to-regexp coq-retractable-instruct))
+(defvar coq-non-retractable-instruct-regexp
+ (proof-ids-to-regexp coq-non-retractable-instruct))
(defvar coq-keywords-section
'("Section" "Module\\s-+Type" "Declare\\s-+Module" "Module"))
@@ -592,6 +594,14 @@ This function calls `coq-find-and-forget-v81' or
(cons 'hyp (match-string 1)))
(t nil)))
+(defun coq-state-preserving-p (cmd)
+; (or
+ (proof-string-match coq-non-retractable-instruct-regexp cmd))
+; (and
+; (not (proof-string-match coq-retractable-instruct-regexp cmd))
+; (or
+; (message "Unknown command, hopes this won't desynchronize ProofGeneral")
+; t))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Commands specific to coq ;;
@@ -814,6 +824,7 @@ This is specific to `coq-mode'."
(setq proof-goal-command-p 'coq-goal-command-p
proof-find-and-forget-fn 'coq-find-and-forget
pg-topterm-goalhyp-fn 'coq-goal-hyp
+ proof-state-preserving-p 'coq-state-preserving-p
)
(setq proof-save-command-regexp coq-save-command-regexp