aboutsummaryrefslogtreecommitdiff
path: root/generic/proof.el
diff options
context:
space:
mode:
authorDavid Aspinall1998-11-20 14:24:51 +0000
committerDavid Aspinall1998-11-20 14:24:51 +0000
commit42e140a8405b11a04b309ed3f99805aaa44c5268 (patch)
treeffd32fbfd83842e0253da799cab264e03798b8a8 /generic/proof.el
parentdf5251b00f874b9081cf48a2bda8d848b7710750 (diff)
BIG CHANGES -- SORRY!
Replaced proof-script-buffer-list with proof-script-buffer. The list was causing too much confusion and nasty bugs used with Isabelle multiple files. Implemented proof-script-buffers and proof-restart-all-buffers, other functions.
Diffstat (limited to 'generic/proof.el')
-rw-r--r--generic/proof.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/generic/proof.el b/generic/proof.el
index 554e0284..64f57d1e 100644
--- a/generic/proof.el
+++ b/generic/proof.el
@@ -79,11 +79,8 @@ Whenever a new file is being processed, it gets added.
When the prover retracts across file boundaries, this list
is resynchronised. It contains files in canonical truename format")
-(defvar proof-script-buffer-list nil
- "Scripting buffers with locked regions.
-The first element is current and in scripting minor mode.
-The cdr of the list of corresponding file names is a subset of
-`proof-included-files-list'.")
+(defvar proof-script-buffer nil
+ "The currently active scripting buffer or nil if none.")
(defvar proof-shell-buffer nil
"Process buffer where the proof assistant is run.")
@@ -188,5 +185,17 @@ frame is the one showing the script buffer.)"
(if proof-auto-delete-windows
(delete-windows-on buffer t)))
+;; utility function
+(defun proof-buffers-in-mode (mode &optional buflist)
+ "Return a list of the buffers in the buffer list in major-mode MODE.
+Restrict to BUFLIST if it's set."
+ (let ((bufs-left (or buflist (buffer-list)))
+ bufs-got)
+ (dolist (buf bufs-left bufs-got)
+ (if (with-current-buffer buf (eq mode major-mode))
+ (setq bufs-got (cons buf bufs-got))))))
+
+
+
(provide 'proof)
;; proof.el ends here