From 7be5c00b292bffee1709afa771ee9db99b7eb050 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Tue, 13 Jan 2004 09:47:28 +0000 Subject: (chess-display-set-index): If INDEX is greater than chess-game-index, and the last ply is not final, we emit a 'forward chess-module-game event to give ics a chance to issue "forward\n". This makes '.' work as expected in examined games. --- chess-display.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chess-display.el b/chess-display.el index 98845fb..19d3ddd 100644 --- a/chess-display.el +++ b/chess-display.el @@ -222,10 +222,13 @@ also view the same game." (defun chess-display-set-index (display index) (chess-with-current-buffer display - (unless (or (not (integerp index)) - (< index 0) - (> index (chess-game-index chess-module-game))) - (chess-game-run-hooks chess-module-game 'set-index index)))) + (if (not (or (not (integerp index)) + (< index 0) + (> index (chess-game-index chess-module-game)))) + (chess-game-run-hooks chess-module-game 'set-index index) + (when (and (> index (chess-game-index chess-module-game)) + (not (chess-ply-final-p (chess-game-ply chess-module-game)))) + (chess-game-run-hooks chess-module-game 'forward))))) (defun chess-display-set-index* (display index) (chess-with-current-buffer display -- cgit v1.2.3