]> code.delx.au - gnu-emacs-elpa/commitdiff
(chess-display-paint-move): Handle :en-passant
authorMario Lang <mlang@delysid.org>
Fri, 6 Feb 2004 12:29:33 +0000 (12:29 +0000)
committerMario Lang <mlang@delysid.org>
Fri, 6 Feb 2004 12:29:33 +0000 (12:29 +0000)
captures (remove the captured pawn from the board).

chess-display.el

index 7e70f31e2909afb9e44abe398cc06d647f7c2fd9..b925908643a63d79ae93cb1c5456cab06c31bbfb 100644 (file)
@@ -12,7 +12,8 @@
   :group 'chess)
 
 (defcustom chess-display-popup t
-  "If non-nil, popup displays whenever a significant event occurs."
+  "If non-nil (the default), popup displays whenever a significant event
+occurs."
   :type 'boolean
   :group 'chess-display)
 
@@ -334,7 +335,11 @@ also view the same game."
                             (downcase new-piece)) to)
                (funcall chess-display-event-handler 'draw-square
                         (chess-display-index-pos nil to)
-                        (chess-pos-piece position from) to))))
+                        (chess-pos-piece position from) to)))
+           (when (chess-ply-keyword ply :en-passant)
+             (funcall chess-display-event-handler 'draw-square
+                      (chess-display-index-pos nil (chess-pos-en-passant position))
+                      ?  (chess-pos-en-passant position))))
          (setq ch (cddr ch)))))))
 
 (chess-message-catalog 'english