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

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

[elpa] externals/gnugo cba406b 176/357: [gnugo] Include root node in :sg


From: Stefan Monnier
Subject: [elpa] externals/gnugo cba406b 176/357: [gnugo] Include root node in :sgf-gametree description.
Date: Sun, 29 Nov 2020 14:51:16 -0500 (EST)

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

    [gnugo] Include root node in :sgf-gametree description.
    
    * packages/gnugo/gnugo.el (gnugo--root-node): Move earlier in file.
    (gnugo-describe-internal-properties): ...here.
---
 gnugo.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index b6c9e1b..ced9868 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -263,6 +263,10 @@ See `gnugo-put'."
   (aset tree 0 (apply 'vector ls))
   (gnugo--tree-ends tree))
 
+(defun gnugo--root-node (&optional tree)
+  (aref (or tree (gnugo-get :sgf-gametree))
+        2))
+
 (defun gnugo-describe-internal-properties ()
   "Pretty-print `gnugo-state' properties in another buffer.
 Handle the big, slow-to-render, and/or uninteresting ones specially."
@@ -283,6 +287,7 @@ Handle the big, slow-to-render, and/or uninteresting ones 
specially."
                            (:sgf-gametree
                             (list (hash-table-count
                                    (gnugo--tree-mnum val))
+                                  (gnugo--root-node val)
                                   (gnugo--tree-ends val)))
                            (:monkey
                             (let ((mem (aref val 0)))
@@ -403,10 +408,6 @@ when you are sure the command cannot fail."
 (defsubst gnugo--count-query (fmt &rest args)
   (length (apply 'gnugo-lsquery fmt args)))
 
-(defun gnugo--root-node (&optional tree)
-  (aref (or tree (gnugo-get :sgf-gametree))
-        2))
-
 (defsubst gnugo--root-prop (prop &optional tree)
   (cdr (assq prop (gnugo--root-node tree))))
 



reply via email to

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