aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2015-03-03 09:36:22 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2015-03-03 09:36:22 +0000
commit3c071eb4457c077286049f03d0bc8f025d497281 (patch)
treeb35c7790c4f56a5286607c9bbee7ede1bc9621dd /coq/coq.el
parent17185897996db7c001b9c5c1e0cbef8860388e07 (diff)
Coqtop always restarted when switching script buffer.
This comes from Hendrik's compile mode and is actually needed even when this mode is off. When switching scripting buffer, restart the coq shell process, so that it applies local coqtop options.
Diffstat (limited to 'coq/coq.el')
-rw-r--r--coq/coq.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/coq/coq.el b/coq/coq.el
index a594bd49..f302d641 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -2511,8 +2511,14 @@ are non-nil at the same time, this gives priority to the former."
(let ((filename (concatenate 'string proof-home-directory "contrib/ML4PG/ml4pg.el")))
(when (file-exists-p filename) (load-file filename) (ml4pg-select-mode))))
-
-
+;;;;;;;;;;;;;;
+
+;; This was done in coq-compile-common, but it is actually a good idea even
+;; when "compile when require" is off. When switching scripting buffer, let us
+;; restart the coq shell process, so that it applies local coqtop options.
+(add-hook 'proof-deactivate-scripting-hook
+ 'coq-switch-buffer-kill-proof-shell ;; this function is in coq-compile-common
+ t)
(provide 'coq)