From 4a5de0c46970e59b1cb890cdb6cdfdcae47b34a8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 9 Apr 2002 09:55:46 +0000 Subject: *** no comment *** --- chess-display.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'chess-display.el') diff --git a/chess-display.el b/chess-display.el index 24a4638..0bcd022 100644 --- a/chess-display.el +++ b/chess-display.el @@ -289,8 +289,12 @@ See `chess-display-type' for the different kinds of displays." (chess-display-destroy nil))) ((eq event 'pass) - (chess-display-set-perspective - nil (not (chess-display-perspective nil)))) + (let ((my-color (if chess-display-game + (chess-game-get-data chess-display-game 'my-color) + (chess-display-perspective nil)))) + (if chess-display-game + (chess-game-set-data chess-display-game 'my-color (not my-color))) + (chess-display-set-perspective nil (not my-color)))) ((memq event '(move game-over resign)) (chess-display-set-index nil (chess-game-index @@ -634,7 +638,9 @@ to the end or beginning." (defun chess-keyboard-shortcut-delete () (interactive) - (when chess-move-string + (when (and chess-move-string + (stringp chess-move-string) + (> (length chess-move-string) 1)) (setq chess-move-string (substring chess-move-string 0 (1- (length chess-move-string)))) -- cgit v1.2.3