summaryrefslogtreecommitdiff
path: root/chess-engine.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-09 23:11:42 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-09 23:11:42 +0000
commit4c79e4f37969528483b3558a231977a1be2d4f51 (patch)
tree952ef183441049d17be55e815e955afd3f590533 /chess-engine.el
parent054d7db6de897aa10894d2fa1e813f9fd0cd09d8 (diff)
*** no comment ***
Diffstat (limited to 'chess-engine.el')
-rw-r--r--chess-engine.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/chess-engine.el b/chess-engine.el
index 219bf34..909b7b7 100644
--- a/chess-engine.el
+++ b/chess-engine.el
@@ -134,8 +134,13 @@
(set-process-buffer proc (current-buffer))
(set-process-filter proc 'chess-engine-filter))
(setq chess-engine-current-marker (point-marker)))
+ (add-hook 'kill-buffer-hook 'chess-engine-on-kill nil t)
(current-buffer))))
+(defun chess-engine-on-kill ()
+ "Function called when the buffer is killed."
+ (chess-engine-detach-game nil))
+
(defun chess-engine-destroy (engine)
(let ((buf (or engine (current-buffer))))
(if (buffer-live-p buf)