From 77be5944f30c9d06512d5b3dd80d7c90a0805c9d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Apr 2002 21:08:05 +0000 Subject: (chess-display-handler): Set the side-to-move text to a reasonable default. --- chess-display.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'chess-display.el') diff --git a/chess-display.el b/chess-display.el index 67596f8..c445a1e 100644 --- a/chess-display.el +++ b/chess-display.el @@ -209,6 +209,13 @@ also view the same game." (chess-module-leader-p nil)) (chess-display-popup nil)))) +(defun chess-display-redraw (&optional display) + "Just redraw the current display." + (interactive) + (chess-with-current-buffer display + (erase-buffer) + (chess-display-update nil))) + (defun chess-display-move (display ply) "Move a piece on DISPLAY, by applying the given PLY. The position of PLY must match the currently displayed position. @@ -281,6 +288,10 @@ See `chess-display-type' for the different kinds of displays." (progn (chess-display-mode) (setq chess-display-index (chess-game-index game) + chess-display-side-to-move + (if (chess-pos-side-to-move (chess-game-pos game)) + (chess-string 'mode-white) + (chess-string 'mode-black)) chess-display-move-text (chess-string 'mode-start) chess-display-perspective (car args) chess-display-event-handler @@ -413,12 +424,6 @@ The key bindings available in this mode are: ;; Commands used by the keyboard bindings above ;; -(defun chess-display-redraw () - "Just redraw the current display." - (interactive) - (erase-buffer) - (chess-display-update nil)) - (defsubst chess-display-active-p () "Return non-nil if the displayed chessboard reflects an active game. Basically, it means we are playing, not editing or reviewing." -- cgit v1.2.3