[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/04: [gnugo sgf int] Consolidate loops.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/04: [gnugo sgf int] Consolidate loops. |
Date: |
Fri, 11 Apr 2014 09:24:59 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit a47d5d34e761d78c636e3a813a340b2eda365072
Author: Thien-Thi Nguyen <address@hidden>
Date: Fri Apr 11 10:25:12 2014 +0200
[gnugo sgf int] Consolidate loops.
* packages/gnugo/gnugo.el (gnugo/sgf-write-file):
...here, for "taking responsibility" and "write it out".
---
packages/gnugo/gnugo.el | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 2009034..dbbe01a 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -2763,12 +2763,8 @@ A collection is a list of gametrees, each a vector of
four elements:
tree)))
(defun gnugo/sgf-write-file (collection filename)
- ;; take responsibility for our actions
- (let ((me (cons "gnugo.el" gnugo-version)))
- (dolist (tree collection)
- (gnugo--set-root-prop :AP me tree)))
- ;; write it out
(let ((aft-newline-appreciated '(:AP :GN :PB :PW :HA :KM :RU :RE))
+ (me (cons "gnugo.el" gnugo-version))
(specs (mapcar (lambda (full)
(cons (intern (format ":%s" (car full)))
(cdddr full)))
@@ -2835,6 +2831,9 @@ A collection is a list of gametrees, each a vector of
four elements:
(insert ")")))
(with-temp-buffer
(dolist (tree collection)
+ ;; take responsibility for our actions
+ (gnugo--set-root-prop :AP me tree)
+ ;; write it out
(>>tree (gnugo/sgf-hang-from-root tree)))
(newline)
(write-file filename)))))
- [elpa] branch master updated (2f9b6b0 -> 991d7f6), Thien-Thi Nguyen, 2014/04/11
- [elpa] 01/04: [gnugo sgf int] Consolidate loops.,
Thien-Thi Nguyen <=
- [elpa] 04/04: [gnugo int] Decruft: Drop gametree IR element: KIDS, Thien-Thi Nguyen, 2014/04/11
- [elpa] 02/04: [gnugo sgf int] Internalize ‘gnugo/sgf-hang-from-root’., Thien-Thi Nguyen, 2014/04/11
- [elpa] 03/04: [gnugo int] Reorder gametree IR: ENDS, MNUM, ROOT, KIDS., Thien-Thi Nguyen, 2014/04/11