diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-14 21:57:09 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-14 21:57:09 +0000 |
| commit | 5a0a6d1cda9134420ea5e0d08919637c0b6774e1 (patch) | |
| tree | 4924bba9f0b529d465c10bab47c260cad6537720 /chess-display.el | |
| parent | af2d89aa2d0cc832b4659ee8e5344e69fd4c45e9 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chess-display.el b/chess-display.el index 4f1d004..229a75a 100644 --- a/chess-display.el +++ b/chess-display.el @@ -74,20 +74,22 @@ cause the underlying game object to be shutdown when it is destroyed. If READ-ONLY is non-nil, then the display will not allow the user to makes moves, or any other changes to the underlying game." (let* ((name (symbol-name style)) - (handler (intern-soft (concat name "-handler")))) + (handler (intern-soft (concat name "-handler"))) + buffer) (unless handler (chess-error 'no-such-style name)) (with-current-buffer (generate-new-buffer "*Chessboard*") + (setq buffer (current-buffer)) (chess-display-mode read-only) (when (funcall handler 'initialize) + (add-hook 'kill-buffer-hook 'chess-display-quit nil t) (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))))) + buffer)))) (defun chess-display-clone (display style perspective) (let ((new-display (chess-display-create chess-display-game |
