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

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

[elpa] externals/gnugo 001228c 205/357: [gnugo] Drop support for ‘(gnug


From: Stefan Monnier
Subject: [elpa] externals/gnugo 001228c 205/357: [gnugo] Drop support for ‘(gnugo-move-history 'count)’.
Date: Sun, 29 Nov 2020 14:51:22 -0500 (EST)

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

    [gnugo] Drop support for ‘(gnugo-move-history 'count)’.
    
    * packages/gnugo/gnugo.el (gnugo-move-history): ...here.
    (gnugo-refresh): For ‘~m’, access :sgf-gametree, :monkey directly.
---
 NEWS     |  1 +
 gnugo.el | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index 02c9337..3c51bdf 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,7 @@ NB: "RCS: X..Y " means that the particular release includes
     - ‘gnugo/sgf-read-file’ renamed to ‘gnugo/sgf-create’ and enhanced
     - ‘:sgf-gametree’ internal representation inverted (BI)
     - ‘gnugo-magic-undo’ handles SPEC ‘0’
+    - dropped ‘(gnugo-move-history 'count)’ (BI)
 
 - 2.3.1 | 2014-02-27
   - portability fixes
diff --git a/gnugo.el b/gnugo.el
index 8047d5f..7e7f446 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -695,10 +695,10 @@ If nil, display the history in the echo area as \"(N 
moves)\"
 followed by the space-separated list of moves.  When called
 interactively with a prefix arg (i.e., RSEL is `(4)'), display
 similarly, but suffix with the mover (either \":B\" or \":W\").
-If RSEL is the symbol `car' return the most-recent move; if
-`cadr', the next-to-most-recent move; if `count' the number of
-moves thus far; if `two' the last two moves as a list, oldest last.
-
+RSEL may also be a symbol that selects what to return:
+ car  -- the most-recent move
+ cadr -- the next-to-most-recent move
+ two  -- the last two moves as a list, oldest last
 For all other values of RSEL, do nothing and return nil."
   (interactive "P")
   (let* ((monkey (gnugo-get :monkey))
@@ -726,8 +726,6 @@ For all other values of RSEL, do nothing and return nil."
         (`nil (finish nil))
         (`car        (car (nn)))
         (`cadr  (nn) (car (nn)))
-        (`count (gethash (car mem) (gnugo--tree-mnum
-                                    (gnugo-get :sgf-gametree))))
         (`two (nn) (nn) acc)
         (_ nil)))))
 
@@ -1553,7 +1551,12 @@ its move."
                                       (cadr (time-since ws))
                                     "-")))
                            (?u '(or (gnugo-get :last-waiting) "-"))
-                           (?m '(gnugo-move-history 'count))))
+                           (?m '(let ((tree (gnugo-get :sgf-gametree))
+                                      (monkey (gnugo-get :monkey)))
+                                  (gethash (car (aref monkey 0))
+                                           (gnugo--tree-mnum tree)
+                                           ;; should be unnecessary
+                                           "?")))))
                       acc))
                    `(let ,(delete-dups (copy-sequence acc))
                       (format ,cur ,@(reverse (mapcar 'car acc))))))



reply via email to

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