summaryrefslogtreecommitdiff
path: root/chess-display.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-14 19:52:56 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-14 19:52:56 +0000
commitd5e9f0a3c531104936728c5a599dde77c67319b0 (patch)
tree0868b9db313b9f15ddd9e74050171237cd8b889f /chess-display.el
parentd881274ead232567cf80f0057031b05f5b0551bc (diff)
*** no comment ***
Diffstat (limited to 'chess-display.el')
-rw-r--r--chess-display.el20
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))