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-input.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-input.el')
| -rw-r--r-- | chess-input.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chess-input.el b/chess-input.el index ce7b348..7d94940 100644 --- a/chess-input.el +++ b/chess-input.el @@ -40,12 +40,14 @@ (defvar chess-input-moves-pos nil) (defvar chess-input-moves nil) (defvar chess-input-position-function nil) +(defvar chess-input-my-color-function nil) (defvar chess-input-move-function nil) (make-variable-buffer-local 'chess-input-move-string) (make-variable-buffer-local 'chess-input-moves-pos) (make-variable-buffer-local 'chess-input-moves) (make-variable-buffer-local 'chess-input-position-function) +(make-variable-buffer-local 'chess-input-my-color-function) (make-variable-buffer-local 'chess-input-move-function) (defun chess-input-test-move (ply) @@ -90,7 +92,7 @@ (defun chess-input-shortcut (&optional display-only) (interactive) (let* ((position (funcall chess-input-position-function)) - (color (chess-pos-side-to-move position)) + (color (funcall chess-input-my-color-function)) char) (unless (memq last-command '(chess-input-shortcut chess-input-shortcut-delete)) |
