From d5e9f0a3c531104936728c5a599dde77c67319b0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 14 Apr 2002 19:52:56 +0000 Subject: *** no comment *** --- chess-display.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'chess-display.el') diff --git a/chess-display.el b/chess-display.el index 266b2d1..4f1d004 100644 --- a/chess-display.el +++ b/chess-display.el @@ -79,15 +79,15 @@ makes moves, or any other changes to the underlying game." (chess-error 'no-such-style name)) (with-current-buffer (generate-new-buffer "*Chessboard*") (chess-display-mode read-only) - (funcall handler 'initialize) - (setq chess-display-style style - chess-display-perspective perspective - chess-display-event-handler handler) - (if main - (chess-display-set-main nil)) - (chess-display-set-game* nil game) - (add-hook 'kill-buffer-hook 'chess-display-quit nil t) - (current-buffer)))) + (when (funcall handler 'initialize) + (setq chess-display-style style + chess-display-perspective perspective + chess-display-event-handler handler) + (if main + (chess-display-set-main nil)) + (chess-display-set-game* nil game) + (add-hook 'kill-buffer-hook 'chess-display-quit nil t) + (current-buffer))))) (defun chess-display-clone (display style perspective) (let ((new-display (chess-display-create chess-display-game @@ -314,6 +314,8 @@ called." "This display module presents a standard chessboard. See `chess-display-type' for the different kinds of displays." (with-current-buffer display + (apply chess-display-event-handler event args) + (cond ((eq event 'shutdown) (chess-display-destroy nil)) -- cgit v1.2.3