aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-script.el
diff options
context:
space:
mode:
authorDavid Aspinall2002-06-30 17:41:03 +0000
committerDavid Aspinall2002-06-30 17:41:03 +0000
commitf220ea8912f37bedf05d3431f4cb6a3beb51688d (patch)
treeb7a0a9dea2e2d83a66689a4920154a725b2448d0 /generic/proof-script.el
parent189395ce88ba2d3208726ff7ccd007df57aa1524 (diff)
When killing process or scripting buffer, register file if it is complete, rather than always retracting.
Diffstat (limited to 'generic/proof-script.el')
-rw-r--r--generic/proof-script.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el
index a527ed3d..e9ca77fc 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -810,6 +810,13 @@ an error is signalled here."
(and (eq action 'process) (proof-locked-region-full-p))
(error "%s of %s failed!" name buf)))))))
+(defun proof-deactivate-scripting-auto ()
+ "Deactivate scripting without asking questions.
+If the locked region is full, register the file as processed.
+Otherwise retract it."
+ (proof-deactivate-scripting
+ (proof-with-script-buffer
+ (if (proof-locked-region-full-p) 'process 'retract))))
(defun proof-deactivate-scripting (&optional forcedaction)
"Deactivate scripting for the active scripting buffer.
@@ -2357,13 +2364,13 @@ to restore them using `after-set-visited-file-name-hooks'."
(defun proof-script-kill-buffer-fn ()
"Value of kill-buffer-hook for proof script buffers.
Clean up before a script buffer is killed.
-If killing the active scripting buffer, run proof-deactivate-scripting.
+If killing the active scripting buffer, run proof-deactivate-scripting-auto.
Otherwise just do proof-restart-buffers to delete some spans from memory."
;; Deactivate scripting in the current buffer if need be, forcing
;; automatic retraction if the buffer is not fully processed.
(unwind-protect
(if (eq (current-buffer) proof-script-buffer)
- (proof-deactivate-scripting 'retract))
+ (proof-deactivate-scripting-auto))
(proof-restart-buffers (list (current-buffer)))
;; Hide away goals, response, and tracing. This is a hack because
;; otherwise we can lead the user to frustration with the