diff options
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) |