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

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

[elpa] externals/gnugo 16da062 284/357: [gnugo int] Use ‘loop ... colle


From: Stefan Monnier
Subject: [elpa] externals/gnugo 16da062 284/357: [gnugo int] Use ‘loop ... collect’ more.
Date: Sun, 29 Nov 2020 14:51:40 -0500 (EST)

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

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

diff --git a/gnugo.el b/gnugo.el
index dab2c17..4de6931 100644
--- a/gnugo.el
+++ b/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]