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

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

[elpa] 01/03: [gnugo int] Use ‘loop ... collect’ more.


From: Thien-Thi Nguyen
Subject: [elpa] 01/03: [gnugo int] Use ‘loop ... collect’ more.
Date: Sat, 03 May 2014 12:46:37 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 9c70616de87e2bf782fab16cd126c331213b83e5
Author: Thien-Thi Nguyen <address@hidden>
Date:   Sat May 3 08:52:09 2014 +0200

    [gnugo int] Use ‘loop ... collect’ more.
    
    * packages/gnugo/gnugo.el (gnugo-describe-internal-properties): ...here.
---
 packages/gnugo/gnugo.el |   44 +++++++++++++++++++++-----------------------
 1 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index dab2c17..4de6931 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -319,31 +319,29 @@ Handle the big, slow-to-render, and/or uninteresting ones 
specially."
   (interactive)
   (let ((buf (current-buffer))
         (d (gnugo-get :diamond))
-        acc)
-    (loop for key being the hash-keys of gnugo-state
-          using (hash-values val)
-          do (push (cons key
-                         (case key
-                           ((:xpms)
-                            (format "hash: %X (%d images)"
-                                    (sxhash val)
-                                    (length val)))
-                           (:sgf-collection
-                            (length val))
-                           (:sgf-gametree
-                            (list (hash-table-count
-                                   (gnugo--tree-mnum val))
-                                  (gnugo--root-node val)
-                                  (gnugo--tree-ends val)))
-                           (:monkey
-                            (let ((mem (aref val 0)))
-                              (list (aref val 1)
-                                    (car mem))))
-                           (t val)))
-                   acc))
+        (acc (loop for key being the hash-keys of gnugo-state
+                   using (hash-values val)
+                   collect (cons key
+                                 (case key
+                                   ((:xpms)
+                                    (format "hash: %X (%d images)"
+                                            (sxhash val)
+                                            (length val)))
+                                   (:sgf-collection
+                                    (length val))
+                                   (:sgf-gametree
+                                    (list (hash-table-count
+                                           (gnugo--tree-mnum val))
+                                          (gnugo--root-node val)
+                                          (gnugo--tree-ends val)))
+                                   (:monkey
+                                    (let ((mem (aref val 0)))
+                                      (list (aref val 1)
+                                            (car mem))))
+                                   (t val))))))
     (switch-to-buffer (get-buffer-create
                        (format "%s*GNUGO Board Properties*"
-                               (gnugo-get :diamond))))
+                               d)))
     (erase-buffer)
     (emacs-lisp-mode)
     (setq truncate-lines t)



reply via email to

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