From da58e86d8e2d128f0b2519b08593d79da83d0c73 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 24 Apr 2002 19:56:54 +0000 Subject: *** no comment *** --- chess-sound.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chess-sound.el') diff --git a/chess-sound.el b/chess-sound.el index 9713ec8..4a34121 100644 --- a/chess-sound.el +++ b/chess-sound.el @@ -68,8 +68,8 @@ (chess-sound "move")) (let* ((source (chess-ply-source ply)) (target (chess-ply-target ply)) - (s-piece (chess-pos-piece pos source)) - (t-piece (chess-pos-piece pos target)) + (s-piece (and source (chess-pos-piece pos source))) + (t-piece (and target (chess-pos-piece pos target))) (which (chess-ply-keyword ply :which)) text) (cond @@ -77,12 +77,12 @@ (chess-sound "O-O")) ((chess-ply-keyword ply :long-castle) (chess-sound "O-O-O")) - ((= t-piece ? ) + ((and s-piece t-piece (= t-piece ? ) target) (if which (chess-sound (char-to-string which))) (chess-sound (format "%c_" (downcase s-piece))) (chess-sound (chess-index-to-coord target))) - (t + ((and s-piece t-piece target) (if which (chess-sound (char-to-string which))) (chess-sound (format "%c_" (downcase s-piece))) -- cgit v1.2.3