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

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

[elpa] externals/gnugo 4930156 239/357: [gnugo int] Move ‘gnugo-positio


From: Stefan Monnier
Subject: [elpa] externals/gnugo 4930156 239/357: [gnugo int] Move ‘gnugo-position’ call down-chain.
Date: Sun, 29 Nov 2020 14:51:30 -0500 (EST)

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

    [gnugo int] Move ‘gnugo-position’ call down-chain.
    
    * packages/gnugo/gnugo.el (gnugo--climb-towards-root):
    ...into here if SPEC is neither number nor string.
    (gnugo-oops, gnugo-fancy-undo): Update accordingly.
---
 gnugo.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index d926725..345fd9b 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1957,7 +1957,9 @@ If FILENAME already exists, Emacs confirms that you wish 
to overwrite it."
                                  2)
                              spec)
                            (aref monkey 0))
-                 (let* ((pos spec)
+                 (let* ((pos (if (stringp spec)
+                                 spec
+                               (gnugo-position)))
                         (hmm (gnugo--mem-with-played-stone pos)))
                    ;; todo: relax ‘gnugo--user-play’ then lift restriction
                    (unless (eq (gnugo--prop<-color user-color)
@@ -2022,8 +2024,7 @@ Prefix arg means, instead, undo repeatedly up to and 
including
 the move which placed the stone at point, like `\\[gnugo-fancy-undo]'."
   (interactive "P")
   (gnugo-gate)
-  (gnugo--climb-towards-root (if position
-                                 (gnugo-position)
+  (gnugo--climb-towards-root (unless position
                                0)
                              nil t))
 
@@ -2218,8 +2219,7 @@ which placed the stone at point."
   (interactive "P")
   (gnugo--climb-towards-root
    (cond ((numberp count) count)
-         ((consp count) (car count))
-         (t (gnugo-position)))))
+         ((consp count) (car count)))))
 
 (defun gnugo-toggle-image-display-command () ; ugh
   "Toggle use of images to display the board, then refresh."



reply via email to

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