summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO5
-rw-r--r--chess-display.el12
-rw-r--r--chess-ics1.el4
-rw-r--r--chess-images.el8
4 files changed, 16 insertions, 13 deletions
diff --git a/TODO b/TODO
index 97f9987..d4559ad 100644
--- a/TODO
+++ b/TODO
@@ -6,6 +6,11 @@
- In chess-pgn.el, output the PGN tags in standard order
+- In edit mode, mouse-2 and mouse-3 should provide a drop-down list of
+ pieces the square can be set to. Cursor movement is really not the
+ best for chess-images. I still need to figure out how best to
+ handle cursor-type with that display.
+
----------------------------------------------------------------------
- Port image display code to XEmacs
diff --git a/chess-display.el b/chess-display.el
index 6d65fa3..e682861 100644
--- a/chess-display.el
+++ b/chess-display.el
@@ -85,8 +85,7 @@
(unless draw
(error "There is no known chessboard display style '%s'" name))
(with-current-buffer (generate-new-buffer "*Chessboard*")
- (setq cursor-type nil
- chess-display-draw-function draw
+ (setq chess-display-draw-function draw
chess-display-highlight-function highlight
chess-display-perspective perspective)
(chess-display-mode)
@@ -514,8 +513,7 @@ to the end or beginning."
(defun chess-display-edit-board ()
"Setup the current board for editing."
(interactive)
- (setq cursor-type t
- chess-display-edit-mode t)
+ (setq chess-display-edit-mode t)
;; Take us out of any game/ply/variation we might be looking at,
;; since we are not moving pieces now, but rather placing them --
;; for which purpose the movement keys can still be used.
@@ -530,15 +528,13 @@ to the end or beginning."
(chess-game-set-plies
chess-display-game
(list (chess-ply-create (chess-display-position nil)))))
- (setq cursor-type nil
- chess-display-edit-mode nil))
+ (setq chess-display-edit-mode nil))
(defun chess-display-restore-board ()
"Setup the current board for editing."
(interactive)
- (setq cursor-type nil
- chess-display-edit-mode nil)
;; jww (2002-03-28): NYI
+ (setq chess-display-edit-mode nil)
(chess-display-update nil))
(defun chess-display-clear-board ()
diff --git a/chess-ics1.el b/chess-ics1.el
index 1491a63..1d016c8 100644
--- a/chess-ics1.el
+++ b/chess-ics1.el
@@ -69,8 +69,8 @@ PERSPECTIVE is t for white or nil for black."
(pop-to-buffer (current-buffer)))
(let (beg end)
(save-excursion
- (beginning-of-line)
- (goto-line (+ 2 (chess-index-rank index)))
+ (goto-char (point-min))
+ (goto-line (+ 3 (* 2 (chess-index-rank index))))
(forward-char (+ 8 (* 4 (chess-index-file index))))
(skip-chars-backward "^|")
(setq beg (point))
diff --git a/chess-images.el b/chess-images.el
index e02c92e..e9b366e 100644
--- a/chess-images.el
+++ b/chess-images.el
@@ -145,9 +145,11 @@ that specialized squares may be used such as marble tiles, etc."
(define-key map [?V] 'chess-images-decrease-size)
(define-key map [?D] 'chess-images-set-directory))
- (setq chess-images-cache nil
- chess-images-size (chess-images-best-size (- (display-pixel-height) 20)
- (- (display-pixel-width) 20))))
+ (setq cursor-type nil
+ chess-images-cache nil
+ chess-images-size
+ (chess-images-best-size (- (display-pixel-height) 20)
+ (- (display-pixel-width) 20))))
(defun chess-images-popup-board ()
(let* ((size (float (+ (* (or chess-images-border-width 0) 8)