diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-15 02:37:37 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-15 02:37:37 +0000 |
| commit | fa48465aa8541d1370d567979000b09f5b06e16a (patch) | |
| tree | f936827e0f209261a6126e2d675cd2812fe7b544 /chess-display.el | |
| parent | b24315b28140dac7cf10828394ff347c4ad3e985 (diff) | |
*** no comment ***
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/chess-display.el b/chess-display.el index c272a4a..69a7e47 100644 --- a/chess-display.el +++ b/chess-display.el @@ -231,8 +231,7 @@ modeline." (defun chess-display-set-index (display index) (chess-with-current-buffer display (chess-display-set-index* nil index) - (chess-display-update nil t) - (chess-display-update-modeline))) + (chess-display-update nil t))) (defsubst chess-display-index (display) (chess-with-current-buffer display @@ -244,6 +243,7 @@ modeline." (funcall chess-display-event-handler 'draw (chess-display-position nil) (chess-display-perspective nil)) + (chess-display-update-modeline) (if (and popup (not chess-display-no-popup) (chess-display-main-p nil)) (chess-display-popup nil)))) @@ -335,9 +335,6 @@ See `chess-display-type' for the different kinds of displays." ((eq event 'destroy) (chess-display-detach-game nil)) - ((eq event 'post-move) - (chess-display-update-modeline)) - ((eq event 'pass) (let ((my-color (chess-game-data game 'my-color))) (chess-game-set-data game 'my-color (not my-color)) @@ -525,8 +522,7 @@ The key bindings available in this mode are: "Just redraw the current display." (interactive) (erase-buffer) - (chess-display-update nil) - (chess-display-update-modeline)) + (chess-display-update nil)) (defsubst chess-display-active-p () "Return non-nil if the displayed chessboard reflects an active game. @@ -1041,9 +1037,9 @@ Clicking once on a piece selects it; then click on the target location." (> piece ?a) (< piece ?a)) (throw 'message (chess-string 'wrong-color))) - ;((null (chess-legal-plies position :index coord)) - ; (throw 'message (chess-string 'piece-immobile))) - ) + ((and chess-display-highlight-legal + (null (chess-legal-plies position :any :index coord))) + (throw 'message (chess-string 'piece-immobile)))) (setq chess-display-last-selected (list (point) coord)) (chess-display-highlight nil coord) (if chess-display-highlight-legal |
