From 9ad8812f86719c346246b4fa70177b0d46a96dc0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 8 Apr 2002 11:56:01 +0000 Subject: *** no comment *** --- TODO | 2 ++ chess-engine.el | 4 ++-- chess-images.el | 8 ++++++-- chess-transport.el | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 2397b45..d13646b 100644 --- a/TODO +++ b/TODO @@ -35,6 +35,8 @@ hook. Then, if you like the result, it call be a `set' on the original board from the copied board. +- Make the mode-line much more informative + ---------------------------------------------------------------------- - Port image display code to XEmacs diff --git a/chess-engine.el b/chess-engine.el index 125bccb..318c205 100644 --- a/chess-engine.el +++ b/chess-engine.el @@ -65,8 +65,8 @@ (with-current-buffer (generate-new-buffer " *chess-engine*") (setq chess-engine-regexp-alist (symbol-value regexp-alist) chess-engine-event-handler handler - chess-engine-response-handler (or 'chess-engine-default-handler - user-handler)) + chess-engine-response-handler (or user-handler + 'chess-engine-default-handler)) (let ((proc (apply handler 'initialize args))) (when (processp proc) (unless (memq (process-status proc) '(run open)) diff --git a/chess-images.el b/chess-images.el index b7f0cc6..9711780 100644 --- a/chess-images.el +++ b/chess-images.el @@ -44,8 +44,9 @@ (defcustom chess-images-directory (if (file-directory-p "/usr/share/games/xboard/pixmaps") "/usr/share/games/xboard/pixmaps" - (expand-file-name "pieces" (file-name-directory - (or load-file-name buffer-file-name)))) + (expand-file-name "pieces/xboard" + (file-name-directory + (or load-file-name buffer-file-name)))) "Directory containing the chess piece bitmap images. You are free to use your own chess pieces, of any size. By default, I assume you have xboard installed, or can go get the pixmaps that come @@ -162,6 +163,9 @@ that specialized squares may be used such as marble tiles, etc." (display-pixel-width)) 20))))) (defun chess-images-popup-board () + (unless chess-images-size + (error "Cannot find any piece images; check `chess-images-directory'")) + (let* ((size (float (+ (* (or chess-images-border-width 0) 8) (* chess-images-size 8)))) (max-char-height (ceiling (/ size (frame-char-height)))) diff --git a/chess-transport.el b/chess-transport.el index f4a72d8..5d9e5b7 100644 --- a/chess-transport.el +++ b/chess-transport.el @@ -18,7 +18,9 @@ ;; Initialize the transport here, if necessary. Make sure that ;; any housekeeping data you use is kept in buffer-local ;; variables. Otherwise, multiple games played using the same - ;; kind of transport might collide. + ;; kind of transport might collide. For example: + ;; + ;; (set (make-local-variable 'chess-transport-data) (car args)) ) ((eq event 'send) -- cgit v1.2.3