summaryrefslogtreecommitdiff
path: root/chess-display.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-10 21:33:06 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-10 21:33:06 +0000
commita827a19a8981fad3e1c5b38d507f06278797ebb4 (patch)
tree3eab85d718bbe383a86bcc7d43b3baea315e616e /chess-display.el
parent0eedce07bb1b26566ba3f26730e8ba97ab475a77 (diff)
*** no comment ***
Diffstat (limited to 'chess-display.el')
-rw-r--r--chess-display.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/chess-display.el b/chess-display.el
index dc5182e..515330d 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -244,13 +244,18 @@ modeline."
(chess-game-set-plies chess-display-game
(chess-game-plies game)))))
-(defun chess-display-set-start-position (display position my-color)
+(defun chess-display-set-start-position (display &optional position my-color)
(chess-with-current-buffer display
(let ((game (chess-display-game nil)))
(if (null game)
- (chess-display-set-position nil position)
- (chess-game-set-data game 'my-color my-color)
- (chess-game-set-start-position game position)))))
+ (chess-display-set-position nil (or position
+ chess-starting-position))
+ (if position
+ (progn
+ (chess-game-set-start-position game position)
+ (chess-game-set-data game 'my-color my-color))
+ (chess-game-set-start-position game chess-starting-position)
+ (chess-game-set-data game 'my-color t))))))
(defun chess-display-detach-game (display)
"Set the display game.