]> code.delx.au - gnu-emacs-elpa/blobdiff - chess-announce.el
*** no comment ***
[gnu-emacs-elpa] / chess-announce.el
index ca563e00503f416df115aaf2e1e17281c94d3a72..1ef1a23d9d97564fedcc58b8cf0381258df3b9b7 100644 (file)
@@ -44,24 +44,19 @@ The first is called one start of the announcer.  The second is called
 with the string to announce each time.  The third is called to
 shutdown the announcer process, if necessary.")
 
-(defun chess-announce-handler (event &rest args)
-  "This display module presents a standard chessboard.
-See `chess-display-type' for the different kinds of displays."
+(defun chess-announce-handler (game event &rest args)
   (cond
    ((eq event 'initialize)
-    (kill-buffer (current-buffer))
-    (set-buffer (generate-new-buffer " *chess-announce*"))
     (funcall (nth 0 chess-announce-functions))
     t)
 
-   ((eq event 'shutdown)
+   ((eq event 'destroy)
     (funcall (nth 2 chess-announce-functions)))
 
    ((eq event 'move)
-    (let* ((ply (chess-game-ply chess-display-game
-                               (1- (chess-game-index chess-display-game))))
+    (let* ((ply (chess-game-ply game (1- (chess-game-index game))))
           (pos (chess-ply-pos ply)))
-      (unless (eq (chess-game-data chess-display-game 'my-color)
+      (unless (eq (chess-game-data game 'my-color)
                  (chess-pos-side-to-move pos))
        (let* ((source (chess-ply-source ply))
               (target (chess-ply-target ply))