diff options
| author | dickmao <dick.r.chiang@gmail.com> | 2018-08-27 17:00:35 -0400 |
|---|---|---|
| committer | dickmao <dick.r.chiang@gmail.com> | 2018-09-06 09:24:10 -0400 |
| commit | 3222b53d942daa404852e5148ba9d3ebb8fe96d0 (patch) | |
| tree | 37e2af6242423e57adbbc1238433f58c92ac9bd0 /chess-ics2.el | |
| parent | 67339d896aa65d75272b80134a8128276c8c6a0f (diff) | |
Pre-moves
To activate, look for Chess Display Allow Pre Moves in:
M-x customize-group
chess-display
Tested via:
make test
make test24 (requires evim)
Diffstat (limited to 'chess-ics2.el')
| -rw-r--r-- | chess-ics2.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chess-ics2.el b/chess-ics2.el index a052bea..18ff7dc 100644 --- a/chess-ics2.el +++ b/chess-ics2.el @@ -169,13 +169,20 @@ PERSPECTIVE is t for white or nil for black." (goto-char pos))) (defun chess-ics2-highlight (index &optional mode) - (let ((pos (chess-display-index-pos nil index))) + (let ((pos (chess-display-index-pos nil index)) + (piece (chess-pos-piece (chess-display-position nil) index))) (put-text-property pos (save-excursion (goto-char (+ pos 2)) (point)) 'face (cond ((eq mode :selected) 'chess-ics2-highlight-face) + ((eq mode :unselected) + (if (> piece ?a) + (if (= a 0) 'chess-ics2-black-face + 'chess-ics2-black-face-alt) + (if (= a 0) 'chess-ics2-white-face + 'chess-ics2-white-face-alt))) (t (chess-display-get-face mode)))))) |
