aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2010-10-10 16:18:43 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2010-10-10 16:18:43 +0000
commit0f35c852e109ab3ea9dbadd00318574aecdfcfa9 (patch)
treef7231a6458c3fb9d922e6752f4efea238f6d32fe
parent37674bf9bbc43da03789a1f47dcedccc685401e5 (diff)
coq-find-and-forget: Allow undoing prover processed regions
(i.e. files locked by Require). Some progress towards #363, and at least stops an ugly type error when a Require'd file is retracted.
-rw-r--r--coq/coq.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/coq/coq.el b/coq/coq.el
index b489dd95..bc76761e 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -395,6 +395,10 @@ If locked span already has a state number, then do nothing. Also updates
(defun coq-find-and-forget (span)
"Backtrack to SPAN. Using the \"Backtrack n m p\" coq command."
+ (if (eq (span-property span 'type) 'proverproc)
+ ;; processed externally (i.e. Require, etc), nothing to do
+ ;; (should really be unlocked when we undo the Require).
+ nil
(let* (ans (naborts 0) (nundos 0)
(proofdepth (coq-get-span-proofnum span))
(proofstack (coq-get-span-proofstack span))
@@ -411,7 +415,7 @@ If locked span already has a state number, then do nothing. Also updates
(format "Backtrack %s %s %s . "
(int-to-string span-staten)
(int-to-string proofdepth)
- naborts)))))
+ naborts))))))
(defvar coq-current-goal 1
"Last goal that Emacs looked at.")