summaryrefslogtreecommitdiff
path: root/chess-pgn.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-10 01:17:48 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-10 01:17:48 +0000
commit0bad9bdd7634f039d5a30cfb19b100bbfe54d18e (patch)
tree3582adb2f5cafdd7b54957b019910f852d00f6ba /chess-pgn.el
parent92dd9a7cb23d4ab14102e02a9f45f096fe8fff13 (diff)
Support smart killing/yanking
Diffstat (limited to 'chess-pgn.el')
-rw-r--r--chess-pgn.el6
1 files changed, 4 insertions, 2 deletions
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)