diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-08 09:01:59 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-08 09:01:59 +0000 |
| commit | 51cf0ef745fe30a34b6072ef6ca4d3ae6f8b90c0 (patch) | |
| tree | 6b993c27a31721272051d4974292afba58e0f4fb /chess-ics1.el | |
| parent | 110d1880915bf26b13a8309419a67bf272b34d4d (diff) | |
*** no comment ***
Diffstat (limited to 'chess-ics1.el')
| -rw-r--r-- | chess-ics1.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chess-ics1.el b/chess-ics1.el index 1d016c8..ef001f2 100644 --- a/chess-ics1.el +++ b/chess-ics1.el @@ -25,7 +25,7 @@ PERSPECTIVE is t for white or nil for black." (erase-buffer) (let* ((position (or disppos (chess-display-position nil))) (inverted (and (null disppos) - (null (chess-display-perspective nil)))) + (not (chess-display-perspective nil)))) (rank (if inverted 7 0)) (file (if inverted 7 0)) beg) @@ -67,11 +67,14 @@ PERSPECTIVE is t for white or nil for black." (defun chess-ics1-highlight (index &optional mode) (if (null (get-buffer-window (current-buffer) t)) (pop-to-buffer (current-buffer))) - (let (beg end) + (let ((inverted (not (chess-display-perspective nil))) + beg end) (save-excursion (goto-char (point-min)) - (goto-line (+ 3 (* 2 (chess-index-rank index)))) - (forward-char (+ 8 (* 4 (chess-index-file index)))) + (let ((rank (chess-index-rank index)) + (file (chess-index-file index))) + (goto-line (+ 3 (* 2 (if inverted (- 7 rank) rank)))) + (forward-char (+ 8 (* 4 (if inverted (- 7 file) file))))) (skip-chars-backward "^|") (setq beg (point)) (skip-chars-forward "^|") |
