From 9110a47188d7cae52a317cf07e73b1e744ad914f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 1 May 2002 21:53:46 +0000 Subject: *** no comment *** --- chess-algebraic.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'chess-algebraic.el') diff --git a/chess-algebraic.el b/chess-algebraic.el index 071e414..ceb3b8b 100644 --- a/chess-algebraic.el +++ b/chess-algebraic.el @@ -66,7 +66,7 @@ This regexp handles both long and short form.") (let ((color (chess-pos-side-to-move position)) (mate (match-string 9 move)) (piece (aref move 0)) - changes) + changes long-style) (if (eq piece ?O) (setq changes (chess-ply-castling-changes position (= (length (match-string 1 move)) 5))) @@ -75,7 +75,9 @@ This regexp handles both long and short form.") (let ((source (match-string 4 move)) (target (chess-coord-to-index (match-string 6 move)))) (if (and source (= (length source) 2)) - (list (chess-coord-to-index source) target) + (prog1 + (list (chess-coord-to-index source) target) + (setq long-style t)) (if (= (length source) 0) (setq source nil) (setq source (aref source 0))) @@ -114,7 +116,8 @@ This regexp handles both long and short form.") (when trust (if mate (nconc changes (list (if (equal mate "#") :checkmate :check))))) - (nconc changes (list :san move)) + (unless long-style + (nconc changes (list :san move))) (apply 'chess-ply-create position trust changes))))) @@ -182,7 +185,8 @@ If LONG is non-nil, render the move into long notation." san) (t (let ((move (chess-ply--move-text ply long))) - (chess-ply-set-keyword ply :san move) + (unless long + (chess-ply-set-keyword ply :san move)) move))))) (provide 'chess-algebraic) -- cgit v1.2.3