diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-16 01:51:16 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-16 01:51:16 +0000 |
| commit | 8163f20956b5624137424a3e229b1a94f77b31e4 (patch) | |
| tree | 541cb8732841f27d0d74f47d8b19e6409d51b0cf | |
| parent | cc68c731c9d045b30da9cacaf6d2c1b11273fcc5 (diff) | |
Keep the :which determiner, if ever we calculate it in
chess-ply-to-algebraic.
| -rw-r--r-- | chess-algebraic.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chess-algebraic.el b/chess-algebraic.el index 0c1fa67..17d4fcc 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))) |
