summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-16 22:39:46 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-16 22:39:46 +0000
commit64bf7311bf40b797ca93ff269a9f6f36cdffd9ce (patch)
tree6e7613ffaf4e6061496c4b99be664c720082b7ef
parent8b186795676c8f7e107e1879d3d46907fdf9db2c (diff)
whitespace changes
-rw-r--r--chess-display.el3
-rw-r--r--chess-images.el22
2 files changed, 12 insertions, 13 deletions
diff --git a/chess-display.el b/chess-display.el
index 1ebe9ba..57ea7f5 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -917,7 +917,8 @@ Clicking once on a piece selects it; then click on the target location."
(chess-display-update nil)
(let ((s-piece (chess-pos-piece position
(cadr last-sel)))
- (t-piece (chess-pos-piece position coord)) ply)
+ (t-piece (chess-pos-piece position coord))
+ ply)
(if (and (/= t-piece ? )
(or (and (< t-piece ?a)
(< s-piece ?a))
diff --git a/chess-images.el b/chess-images.el
index 3eb094e..c42ca32 100644
--- a/chess-images.el
+++ b/chess-images.el
@@ -430,6 +430,7 @@ This is necessary for bizzare Emacs reasons."
(defun chess-images-init-cache ()
"Initialize the display image cache."
(chess-message 'piece-images-loading)
+
;; Make a vector of two vectors of 6-item vectors: each piece of
;; each color on each color square; and lastly two slots for the
;; blank squares
@@ -439,6 +440,7 @@ This is necessary for bizzare Emacs reasons."
(vector (make-vector 6 nil)
(make-vector 6 nil))
nil nil nil nil))
+
(let* ((colors '("black" "white"))
(backgrounds (list chess-images-dark-color
chess-images-light-color))
@@ -472,31 +474,26 @@ This is necessary for bizzare Emacs reasons."
(format "%s.%s" chess-images-background-image
chess-images-extension)
chess-images-directory)))
- (aset chess-images-cache 2
- (chess-images-create-image blank 0))
- (aset chess-images-cache 3
- (chess-images-create-image blank 1)))
+ (aset chess-images-cache 2 (chess-images-create-image blank 0))
+ (aset chess-images-cache 3 (chess-images-create-image blank 1)))
;; try loading an xboard format file
((file-readable-p
(setq name (format "dsq%d.%s" chess-images-size
chess-images-extension)
blank (expand-file-name name chess-images-directory)))
- (aset chess-images-cache 2
- (chess-images-create-image blank 0))
+ (aset chess-images-cache 2 (chess-images-create-image blank 0))
(aset name 0 ?l)
(setq blank (expand-file-name name chess-images-directory))
- (aset chess-images-cache 3
- (chess-images-create-image blank 1)))
+ (aset chess-images-cache 3 (chess-images-create-image blank 1)))
;; if all else fails, create one
(t
(setq image-data
(cond
((string= chess-images-extension "xpm")
(chess-images-create-xpm chess-images-size))))
- (aset chess-images-cache 2
- (chess-images-create-image image-data 0))
- (aset chess-images-cache 3
- (chess-images-create-image image-data 1))))
+ (aset chess-images-cache 2 (chess-images-create-image image-data 0))
+ (aset chess-images-cache 3 (chess-images-create-image image-data 1))))
+
(when chess-images-border-width
(aset chess-images-cache 4
(create-image
@@ -512,6 +509,7 @@ This is necessary for bizzare Emacs reasons."
chess-images-border-width)
nil t :color-symbols
(list (cons "background" chess-images-border-color))))))
+
;; let the garbage collector know we're through here
(garbage-collect)
(chess-message 'piece-images-loaded))