From 8163f20956b5624137424a3e229b1a94f77b31e4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Apr 2002 01:51:16 +0000 Subject: [PATCH] Keep the :which determiner, if ever we calculate it in chess-ply-to-algebraic. --- chess-algebraic.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/chess-algebraic.el b/chess-algebraic.el index 0c1fa6721..17d4fcc51 100644 --- a/chess-algebraic.el +++ b/chess-algebraic.el @@ -136,7 +136,7 @@ If LONG is non-nil, render the move into long notation." (rank 0) (file 0) (from-rank (/ from 8)) (from-file (mod from 8)) - (differentiator (cdr (memq :which (chess-ply-changes ply))))) + (differentiator (chess-ply-keyword ply :which))) (unless differentiator (let ((candidates (chess-search-position pos to from-piece))) (when (> (length candidates) 1) @@ -150,14 +150,18 @@ If LONG is non-nil, render the move into long notation." (setq differentiator (+ from-file ?a))) ((= rank 1) (setq differentiator (+ (- 7 from-rank) ?1))) - (t (chess-error 'could-not-diff)))))) + (t (chess-error 'could-not-diff))) + (nconc (chess-ply-changes ply) + (list :which differentiator))))) (concat (unless (= (upcase from-piece) ?P) (char-to-string (upcase from-piece))) (if long (chess-index-to-coord from) (if differentiator - (char-to-string differentiator) + (prog1 + (char-to-string differentiator) + (chess-ply-changes ply)) (if (and (not long) (= (upcase from-piece) ?P) (/= (chess-index-file from) (chess-index-file to))) -- 2.39.2