diff options
| author | David Aspinall | 2002-08-26 17:39:25 +0000 |
|---|---|---|
| committer | David Aspinall | 2002-08-26 17:39:25 +0000 |
| commit | add6299da8e4fcbb2efa16d75b9126a536cdfca5 (patch) | |
| tree | 0cd39795c3f958d6dc24017e13e4c08cdab061aa /generic/proof-utils.el | |
| parent | 5301fd94b22fa5e59dfcccc19e89e2f3faccd21e (diff) | |
Try to prevent associated buffers being killed off by user.
Diffstat (limited to 'generic/proof-utils.el')
| -rw-r--r-- | generic/proof-utils.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index 18ca1db8..e060d5af 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -244,6 +244,24 @@ Restrict to BUFLIST if it's set." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; +;; Associated buffers +;; + +(defun pg-save-from-death () + "Prevent this associated buffer from being killed. +A hook function for `kill-buffer-hook'. +This is a fairly crude and not-entirely-robust way to prevent the +user accidently killing an associated buffer." + (if (and (proof-shell-live-buffer) proof-buffer-type) + (progn + (let ((bufname (buffer-name))) + (bury-buffer) + (message + "Warning: buffer %s not killed; still associated with prover process." + bufname))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; Key functions (defun proof-define-keys (map kbl) |
