]> code.delx.au - gnu-emacs-elpa/commitdiff
A workaround fix for a bug that prevents the RTL from building.
authorJohn Wiegley <johnw@newartisans.com>
Sat, 6 Apr 2002 01:14:33 +0000 (01:14 +0000)
committerJohn Wiegley <johnw@newartisans.com>
Sat, 6 Apr 2002 01:14:33 +0000 (01:14 +0000)
chess-ics1.el

index 33e0a75d1c0e5d1afea4105bccf65ec24e202bf9..e0867720f36a308b88fdcb0bc52b513d3dd4d129 100644 (file)
@@ -8,6 +8,13 @@
 
 ;;; Code:
 
+(defun chess-display-position (&optional position)
+  "This is a debugging function, and not meant from general use."
+  (interactive)
+  (let ((pos (or position (chess-engine-position nil))))
+    (with-current-buffer (get-buffer-create "*scratch*")
+      (chess-ics1-draw pos))))
+
 (defun chess-ics1-draw (&optional disppos)
   "Draw the given POSITION from PERSPECTIVE's point of view.
 PERSPECTIVE is t for white or nil for black."
@@ -17,7 +24,8 @@ PERSPECTIVE is t for white or nil for black."
        (pos (point)))
     (erase-buffer)
     (let* ((position (or disppos (chess-display-position nil)))
-          (inverted (null (chess-display-perspective nil)))
+          (inverted (and (null disppos)
+                         (null (chess-display-perspective nil))))
           (rank (if inverted 7 0))
           (file (if inverted 7 0))
           beg)