[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/proof-general 3c9bed7061 1/8: Add an option to stop proof-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/proof-general 3c9bed7061 1/8: Add an option to stop proof-shell-kill-function from killing buffers. |
Date: |
Tue, 29 Mar 2022 02:58:41 -0400 (EDT) |
branch: elpa/proof-general
commit 3c9bed7061b420070a068502eefe592685fea800
Author: Calvin Beck <hobbes@ualberta.ca>
Commit: Calvin Beck <hobbes@ualberta.ca>
Add an option to stop proof-shell-kill-function from killing buffers.
---
generic/proof-shell.el | 33 +++++++++++++++++++--------------
generic/proof-useropts.el | 11 +++++++++++
2 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index 3407a0fbd8..3e6d5ac03f 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -494,6 +494,22 @@ process command."
(defvar proof-shell-kill-function-hooks nil
"Functions run from `proof-shell-kill-function'.")
+(defun proof-shell-kill-function-kill-associated-buffers ()
+ "Kill the goal, response, and trace buffers, as well as frames if necessary."
+ ;; Remove auxiliary windows, trying to stop proliferation of
+ ;; frames (NB: loses if user has switched buffer in special frame)
+ (if (and proof-multiple-frames-enable
+ proof-shell-fiddle-frames)
+ (proof-delete-all-associated-windows))
+
+ (let ((proof-shell-buffer nil)) ;; fool kill buffer hooks
+ (dolist (buf '(proof-goals-buffer proof-response-buffer
+ proof-trace-buffer))
+ (when (buffer-live-p (symbol-value buf))
+ (delete-windows-on (symbol-value buf))
+ (kill-buffer (symbol-value buf))
+ (set buf nil)))))
+
(defun proof-shell-kill-function ()
"Function run when a proof-shell buffer is killed.
Try to shut down the proof process nicely and clear locked
@@ -544,20 +560,9 @@ shell buffer, called by `proof-shell-bail-out' if process
exits."
(proof-shell-clear-state)
(run-hooks 'proof-shell-kill-function-hooks)
- ;; Remove auxiliary windows, trying to stop proliferation of
- ;; frames (NB: loses if user has switched buffer in special frame)
- (if (and proof-multiple-frames-enable
- proof-shell-fiddle-frames)
- (proof-delete-all-associated-windows))
-
- ;; Kill associated buffer
- (let ((proof-shell-buffer nil)) ;; fool kill buffer hooks
- (dolist (buf '(proof-goals-buffer proof-response-buffer
- proof-trace-buffer))
- (when (buffer-live-p (symbol-value buf))
- (delete-windows-on (symbol-value buf))
- (kill-buffer (symbol-value buf))
- (set buf nil))))
+ (when proof-shell-kill-function-also-kills-associated-buffers
+ (proof-shell-kill-function-kill-associated-buffers))
+
(setq proof-shell-exit-in-progress nil)
(message "%s exited." bufname)))
diff --git a/generic/proof-useropts.el b/generic/proof-useropts.el
index 9edeec437a..7df22040e8 100644
--- a/generic/proof-useropts.el
+++ b/generic/proof-useropts.el
@@ -230,6 +230,17 @@ selected frame will be automatically deleted."
:type 'boolean
:group 'proof-user-options)
+(defcustom proof-shell-kill-function-also-kills-associated-buffers t
+ "*If non-nil, when `proof-shell-kill-function' is called, clean up buffers.
+For example, `proof-shell-kill-function' is called when buffers
+are retracted when switching between proof script files. It may
+make sense to set this to `nil' when
+`proof-multiple-frames-enable' is set to prevent proof general
+from killing frames that you want to be managed by a window
+manager instead of within emacs."
+ :type 'boolean
+ :group 'proof-user-options)
+
(defcustom proof-shrink-windows-tofit nil
"*If non-nil, automatically shrink output windows to fit contents.
In single-frame mode, this option will reduce the size of the
- [nongnu] elpa/proof-general updated (40c40d229e -> e1e29acb04), ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general 3c9bed7061 1/8: Add an option to stop proof-shell-kill-function from killing buffers.,
ELPA Syncer <=
- [nongnu] elpa/proof-general 39911fe049 2/8: Fix #646. Indentation of function arguments., ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general 1554eb7936 6/8: Merge pull request #648 from Matafou/fix-#599-Proof-using-bad-detection, ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general e1e29acb04 8/8: Merge pull request #639 from Chobbes/save-frames, ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general 24da4f5593 3/8: Fix #599, bad detection of "Proof" in "Proof using" suggestions., ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general 17a4cc00d6 5/8: Merge pull request #649 from Matafou/fix-#618-missing-keyword-derive, ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general ce033327e3 4/8: Support for command "Derive SuchThat As"., ELPA Syncer, 2022/03/29
- [nongnu] elpa/proof-general 0b3454492c 7/8: Merge pull request #647 from Matafou/fix-#646-indent-funargs, ELPA Syncer, 2022/03/29