summaryrefslogtreecommitdiff
path: root/chess-images.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-08 11:56:01 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-08 11:56:01 +0000
commit9ad8812f86719c346246b4fa70177b0d46a96dc0 (patch)
tree7cbae1ebb92d85b5e911de9e917156f2b8347b09 /chess-images.el
parentc0e0c41498641455e269ca8cd94b5f9b0de49bff (diff)
*** no comment ***
Diffstat (limited to 'chess-images.el')
-rw-r--r--chess-images.el8
1 files changed, 6 insertions, 2 deletions
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))))