summaryrefslogtreecommitdiff
path: root/chess.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-08 22:44:48 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-08 22:44:48 +0000
commit2eef64d8e2d555c44b42a439912b08b96a0d70e1 (patch)
tree5ad7bb8c424436c583812f519ad3543d01bc6dd3 /chess.el
parent7aee2f16211b0f3f8fdc7ea1a4c46f32fa3a12a4 (diff)
Added code to announce moves verbally
Diffstat (limited to 'chess.el')
-rw-r--r--chess.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/chess.el b/chess.el
index a5066cd..b557c65 100644
--- a/chess.el
+++ b/chess.el
@@ -98,6 +98,11 @@ a0 243
"Default engine to be used when starting a chess session."
:type 'sexp
:group 'chess)
+(defcustom chess-announce-moves (and (executable-find "festival") t)
+ "If non-nil, announce your opponent's moves verbally."
+minibuffer, which works well for Emacspeak users."
+ :type 'boolean
+ :group 'chess)
(defun chess (&optional arg)
"Start a game of chess."
@@ -112,9 +117,11 @@ a0 243
(intern (or (read-string "Engine module to play against: ")
"chess-none"))
chess-default-engine)))
- (if (and engine-module
- (require engine-module nil t))
- (chess-engine-set-game (chess-engine-create engine-module) game)))))
+ (when (and engine-module
+ (require engine-module nil t))
+ (chess-engine-set-game (chess-engine-create engine-module) game)
+ (if chess-announce-moves
+ (chess-announce-for-game game t))))))
(cons display engine)))
;;;###autoload