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-algebraic.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chess-algebraic.el') diff --git a/chess-algebraic.el b/chess-algebraic.el index 7aebdf3..69cb073 100644 --- a/chess-algebraic.el +++ b/chess-algebraic.el @@ -57,6 +57,7 @@ This regexp handles both long and short form.") (error "Cannot parse non-algebraic move notation: %s" move)) (let* ((color (chess-pos-side-to-move position)) (mate (match-string 10 move)) + (promotion (match-string 9 move)) (piece (aref move 0)) (changes (if (eq piece ?O) @@ -96,6 +97,9 @@ This regexp handles both long and short form.") (if (null which) (error "Could not determine which piece to use") (list which target))))))))))) + (if promotion + (nconc changes + (list :promote (aref promotion 0)))) (if mate (nconc changes (list (if (equal mate "#") -- cgit v1.2.3