From 867ac57bedef9d57c9d2c31cd671de8f824c8262 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 12 Apr 2002 23:14:39 +0000 Subject: *** no comment *** --- chess.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'chess.el') diff --git a/chess.el b/chess.el index b2359ee..07100a0 100644 --- a/chess.el +++ b/chess.el @@ -112,7 +112,8 @@ minibuffer, which works well for Emacspeak users." :type 'string :group 'chess) -(defun chess (&optional engine) +;;;###autoload +(defun chess (&optional engine disable-popup engine-response-handler &rest engine-ctor-args) "Start a game of chess, playing against ENGINE (a module name)." (interactive @@ -139,12 +140,15 @@ minibuffer, which works well for Emacspeak users." (require 'chess-ics1) (setq display (chess-display-create 'chess-ics1 my-color))) + (chess-game-set-data game 'my-color my-color) + (if disable-popup (chess-display-disable-popup display)) (chess-display-set-game display game) (chess-display-set-main display) (let ((engine-module (or engine chess-default-engine))) - (let ((engine (chess-engine-create engine-module))) + (when (and engine-module (require engine-module nil t)) + (let ((engine (apply 'chess-engine-create engine-module nil engine-ctor-args))) (chess-engine-set-game* engine game) ;; for the sake of engines which are ready to play now, and @@ -167,7 +171,8 @@ minibuffer, which works well for Emacspeak users." (if (chess-announce-available-p) (chess-announce-for-game game))))))) - display)) + (chess-display-update display t) + (cons display engine))) ;;;###autoload -- cgit v1.2.3