[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/02: [gnugo int] Add abstraction: gnugo--nodep
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 02/02: [gnugo int] Add abstraction: gnugo--nodep |
Date: |
Thu, 20 Mar 2014 16:24:51 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 5aa1d8a82d5e352c36cd3d599ded66c8031699c2
Author: Thien-Thi Nguyen <address@hidden>
Date: Thu Mar 20 15:34:25 2014 +0100
[gnugo int] Add abstraction: gnugo--nodep
* packages/gnugo/gnugo.el (gnugo--nodep): New defsubst.
(gnugo-read-sgf-file, gnugo/sgf-write-file): Use it.
---
packages/gnugo/gnugo.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 053d8aa..4ff6621 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1293,6 +1293,9 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
"as before"
"NOTE: this is a switch!")))
+(defsubst gnugo--nodep (x)
+ (keywordp (caar x)))
+
(defsubst gnugo--SZ! (size)
(gnugo-put :SZ size))
@@ -1342,7 +1345,7 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
(while (setq node (car loc))
;; A gametree must have at least one node prior to the first
;; sub-gametree (if any), so we need check the CAR only once.
- (unless (symbolp (caar node))
+ (unless (gnugo--nodep node)
(setq loc node
node (car loc)))
(when (setq play (or (assq :B node)
@@ -2250,7 +2253,7 @@ starting a new one. See `gnugo-board-mode' documentation
for more info."
;; requires this somewhat-funky border search.
(let (x subtrees)
(while (setq x (pop tree))
- (if (symbolp (caar x))
+ (if (gnugo--nodep x)
(>>node x)
(setq
;; Add back the first subtree.