emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnugo dae8f08 231/357: [gnugo] Fix bug: DTRT for :last-


From: Stefan Monnier
Subject: [elpa] externals/gnugo dae8f08 231/357: [gnugo] Fix bug: DTRT for :last-user-bpos in undo-one-move ME-NEXT.
Date: Sun, 29 Nov 2020 14:51:28 -0500 (EST)

branch: externals/gnugo
commit dae8f08bd657ea557c9ed8fa7c14aa64b2e22a52
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo] Fix bug: DTRT for :last-user-bpos in undo-one-move ME-NEXT.
    
    Omission from 2014-03-11, "Make ‘C-u M-u’ switch roles".
    
    * packages/gnugo/gnugo.el (gnugo-undo-one-move):
    Swizzle colors before calling ‘gnugo-magic-undo’.
---
 gnugo.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 81a094d..76e67d2 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -2017,13 +2017,13 @@ move was done by the color you prefer to play:
 See also `gnugo-undo-two-moves'."
   (interactive "P")
   (gnugo-gate)
-  (gnugo-magic-undo 1 t)
   (when me-next
-    (let* ((wait (gnugo-get :last-mover))
-           (play (gnugo-other wait)))
+    (let* ((play (gnugo-get :last-mover))
+           (wait (gnugo-other play)))
       (gnugo--who-is-who wait play (string= play (gnugo-get :user-color)))
       (gnugo-put :user-color play)
-      (gnugo-put :gnugo-color wait))))
+      (gnugo-put :gnugo-color wait)))
+  (gnugo-magic-undo 1 t))
 
 (defun gnugo-undo-two-moves ()
   "Undo a pair of moves (GNU Go's and yours).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]