summaryrefslogtreecommitdiff
path: root/chess-common.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-common.el')
-rw-r--r--chess-common.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/chess-common.el b/chess-common.el
index 9e05c96..66a4b99 100644
--- a/chess-common.el
+++ b/chess-common.el
@@ -64,7 +64,10 @@
(chess-engine-send nil "undo\n"))
(if (= 1 (mod (car args) 2))
(chess-engine-send nil "go\n"))
- (chess-game-undo chess-engine-game (car args)))
+
+ ;; prevent use from handling the `undo' event which this triggers
+ (let ((chess-engine-handling-event t))
+ (chess-game-undo chess-engine-game (car args))))
((eq event 'move)
(chess-engine-send nil (concat (chess-ply-to-algebraic (car args))