From 9ad8812f86719c346246b4fa70177b0d46a96dc0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 8 Apr 2002 11:56:01 +0000 Subject: *** no comment *** --- chess-images.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'chess-images.el') 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)))) -- cgit v1.2.3