[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/04: [gnugo] Include root node in :sgf-gametree description.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/04: [gnugo] Include root node in :sgf-gametree description. |
Date: |
Mon, 14 Apr 2014 06:57:41 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 24a88ea052855185c883b2284795c73a98803d92
Author: Thien-Thi Nguyen <address@hidden>
Date: Sun Apr 13 12:13:55 2014 +0200
[gnugo] Include root node in :sgf-gametree description.
* packages/gnugo/gnugo.el (gnugo--root-node): Move earlier in file.
(gnugo-describe-internal-properties): ...here.
---
packages/gnugo/gnugo.el | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index b6c9e1b..ced9868 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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))))