aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Courtieu2002-06-18 21:44:29 +0000
committerPierre Courtieu2002-06-18 21:44:29 +0000
commit4d2ea7b78028cb3b8bfdac7f24031f44dbaa98e3 (patch)
tree9e7c0dc91ee5056608f13a69bb51f891b359dafe
parent7d5787375635260df072f2fd441dd5a0eac3c17e (diff)
Added the backtrack mechanism for sections. Seems to work.
-rw-r--r--coq/coq-syntax.el2
-rw-r--r--coq/coq.el16
2 files changed, 13 insertions, 5 deletions
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index 6615e584..3f8847da 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -42,6 +42,7 @@
(defvar coq-keywords-goal
'(
+"Section"
"Correctness"
"Definition"
"Fact"
@@ -57,6 +58,7 @@
"Defined"
"Save"
"Qed"
+"End"
))
(defvar coq-keywords-kill-goal '(
diff --git a/coq/coq.el b/coq/coq.el
index 97c8ebb4..8f90c4ca 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -260,7 +260,11 @@ have been used."
(setq str (span-property span 'cmd))
(cond
((eq (span-property span 'type) 'comment))
-
+
+ ((proof-string-match
+ (concat "Section\\s-+\\(" proof-id "\\)\\s-*") str)
+ (setq ans (format coq-forget-id-command (match-string 2 str))))
+
((eq (span-property span 'type) 'goalsave)
;; Note da 6.10.99: in Lego and Isabelle, it's trivial to forget an
;; unnamed theorem. Coq really does use the identifier
@@ -269,10 +273,12 @@ have been used."
;; da: try using just Back since "Reset" causes loss of proof
;; state.
- ;; (format coq-forget-id-command (span-property span 'name)))
- (if (span-property span 'nestedundos)
- (setq nbacks (+ 1 nbacks (span-property span 'nestedundos)))))
-
+;; (format coq-forget-id-command (span-property span 'name)))
+ (if (span-property span 'nestedundos)
+ (setq nbacks (+ 1 nbacks (span-property span 'nestedundos)))
+ )
+ )
+
;; Unsaved goal commands: each time we hit one of these
;; we need to issue Abort to drop the proof state.
((coq-goal-command-p str)