[elpa] branch externals/chess updated (f3d3337 -> 9b32e8a)
mlang pushed a change to branch externals/chess in repository elpa. from f3d3337 * chess-display.el (chess-fen, chess-pgn): Require. new 9b32e8a * chess-display.el (chess-display-move): Fix repainting when playing against the internal engine (AI) which runs off the `post-move' game event by adding a `redisplay' call just before the `post-move' emision. (chess-display-select-piece): Use `chess-display-draw-square'. (chess-display-draw-square): Make PIECE argument optional. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: ChangeLog|8 chess-display.el | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions(-)
[elpa] 01/01: * chess-display.el (chess-display-move): Fix repainting when playing against the internal engine (AI) which runs off the `post-move' game event by adding a `redisplay' call just before t
mlang pushed a commit to branch externals/chess in repository elpa. commit 9b32e8a76fa91acb7a33f4227833280398741168 Author: Mario Lang Date: Mon Jun 16 01:08:48 2014 +0200 * chess-display.el (chess-display-move): Fix repainting when playing against the internal engine (AI) which runs off the `post-move' game event by adding a `redisplay' call just before the `post-move' emision. (chess-display-select-piece): Use `chess-display-draw-square'. (chess-display-draw-square): Make PIECE argument optional. --- ChangeLog|8 chess-display.el | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 436fe5b..621a5c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-06-16 Mario Lang + + * chess-display.el (chess-display-move): Fix repainting when playing + against the internal engine (AI) which runs off the `post-move' game + event by adding a `redisplay' call just before the `post-move' emision. + (chess-display-select-piece): Use `chess-display-draw-square'. + (chess-display-draw-square): Make PIECE argument optional. + 2014-06-15 Mario Lang * chess-display.el (chess-display-draw-square): New function. diff --git a/chess-display.el b/chess-display.el index 0287487..dfde368 100644 --- a/chess-display.el +++ b/chess-display.el @@ -355,11 +355,13 @@ also view the same game." (defun chess-display-draw-square (display index piece &optional pos) (cl-check-type display (or null buffer)) (cl-check-type index (integer 0 63)) - (cl-check-type piece (member ? ?P ?N ?B ?R ?Q ?K ?p ?n ?b ?r ?q ?k)) + (cl-check-type piece (member nil ? ?P ?N ?B ?R ?Q ?K ?p ?n ?b ?r ?q ?k)) (chess-with-current-buffer display (cl-check-type pos (or null (number ((point-min)) ((point-max) (funcall chess-display-event-handler 'draw-square -(or pos (chess-display-index-pos nil index)) piece index))) +(or pos (chess-display-index-pos nil index)) +(or piece (chess-pos-piece (chess-display-position nil) index)) +index))) (defun chess-display-paint-move (display ply) (cl-check-type display (or null buffer)) @@ -418,6 +420,7 @@ The position of PLY must match the currently displayed position." (chess-game-move chess-module-game ply) (chess-display-paint-move nil ply) (chess-display-set-index* nil (chess-game-index chess-module-game)) + (redisplay) ; FIXME: This is clearly necessary, but why? (chess-game-run-hooks chess-module-game 'post-move)) ;; jww (2002-03-28): This should beget a variation within the ;; game, or alter the game, just as SCID allows @@ -1222,10 +1225,7 @@ Clicking once on a piece selects it; then click on the target location." position :index (cdr last-sel (unless (= index coord) - (funcall chess-display-event-handler 'draw-square -(chess-display-index-pos nil index) -(chess-pos-piece position index) -index + (chess-display-draw-square nil index (setq chess-display-last-selected nil)) (let ((piece (chess-pos-piece position coord))) (cond
[elpa] branch externals/chess updated (9b32e8a -> ce0e128)
mlang pushed a change to branch externals/chess in repository elpa. from 9b32e8a * chess-display.el (chess-display-move): Fix repainting when playing against the internal engine (AI) which runs off the `post-move' game event by adding a `redisplay' call just before the `post-move' emision. (chess-display-select-piece): Use `chess-display-draw-square'. (chess-display-draw-square): Make PIECE argument optional. new ce0e128 (chess-display-mode-map): Bind DEL to `chess-input-shortcut-delete The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: ChangeLog|2 ++ chess-display.el |1 + 2 files changed, 3 insertions(+), 0 deletions(-)
[elpa] 01/01: (chess-display-mode-map): Bind DEL to `chess-input-shortcut-delete
mlang pushed a commit to branch externals/chess in repository elpa. commit ce0e1286c30f67ee87a95220fe8d160779731ae1 Author: Mario Lang Date: Mon Jun 16 02:21:00 2014 +0200 (chess-display-mode-map): Bind DEL to `chess-input-shortcut-delete --- ChangeLog|2 ++ chess-display.el |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 621a5c4..cbb7a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ event by adding a `redisplay' call just before the `post-move' emision. (chess-display-select-piece): Use `chess-display-draw-square'. (chess-display-draw-square): Make PIECE argument optional. + (chess-display-mode-map): Bind DEL to `chess-input-shortcut-delete' + as intended. 2014-06-15 Mario Lang diff --git a/chess-display.el b/chess-display.el index dfde368..003511e 100644 --- a/chess-display.el +++ b/chess-display.el @@ -644,6 +644,7 @@ See `chess-display-type' for the different kinds of displays." ?o ?O ?x ?=)) (define-key map (vector key) 'chess-input-shortcut)) (define-key map [backspace] 'chess-input-shortcut-delete) +(define-key map "\d" 'chess-input-shortcut-delete) (define-key map [(control ?m)] 'chess-display-select-piece) (define-key map [return] 'chess-display-select-piece)