From 0bad9bdd7634f039d5a30cfb19b100bbfe54d18e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 10 Apr 2002 01:17:48 +0000 Subject: Support smart killing/yanking --- chess-pgn.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chess-pgn.el') diff --git a/chess-pgn.el b/chess-pgn.el index bc06741..fbd2237 100644 --- a/chess-pgn.el +++ b/chess-pgn.el @@ -21,7 +21,7 @@ (goto-char (match-end 0)) (setq prevpos position) (let* ((move (match-string 0)) - (ply (chess-algebraic-to-ply (chess-game-pos game) + (ply (chess-algebraic-to-ply position (match-string 0)))) (unless ply (error "Error reading move: %s" move)) @@ -69,7 +69,9 @@ (chess-fen-to-pos fen) (chess-pos-copy chess-starting-position)) t) ;; set the starting position to the FEN string - (list (chess-ply-create (chess-fen-to-pos fen)))))) + (list (chess-ply-create (if fen + (chess-fen-to-pos fen) + chess-starting-position)))))) game))) (defun chess-pgn-insert-annotations (game index ply) -- cgit v1.2.3