diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-14 19:52:56 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-14 19:52:56 +0000 |
| commit | d5e9f0a3c531104936728c5a599dde77c67319b0 (patch) | |
| tree | 0868b9db313b9f15ddd9e74050171237cd8b889f /chess-display.el | |
| parent | d881274ead232567cf80f0057031b05f5b0551bc (diff) | |
*** no comment ***
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 20 |
1 files changed, 11 insertions, 9 deletions
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)) |
