[Top][All Lists]

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

[elpa] externals/gnugo 423683d 055/357: [gnugo int] Use ‘dolist’, ‘dest

From: Stefan Monnier
Subject: [elpa] externals/gnugo 423683d 055/357: [gnugo int] Use ‘dolist’, ‘destructuring-bind’ more.
Date: Sun, 29 Nov 2020 14:50:47 -0500 (EST)

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

    [gnugo int] Use ‘dolist’, ‘destructuring-bind’ more.
    * packages/gnugo/gnugo.el (gnugo-board-mode): ...here,
    instead of ‘mapc’ + ‘apply’, for post-‘-l’ fixup.
 gnugo.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 274b563..43ee423 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -1724,13 +1724,11 @@ In this mode, keys do not self insert.
     ;; Emacs is too protective sometimes, blech.
     (set-process-query-on-exit-flag (gnugo-get :proc) nil)
     (when (or minus-l infile)
-      (mapc (lambda (x)
-              (apply (lambda (prop q)
-                       (set prop (string-to-number (gnugo-query q))))
-                     x))
-            '((board-size "query_boardsize")
-              (komi       "get_komi")
-              (handicap   "get_handicap"))))
+      (dolist (x '((board-size "query_boardsize")
+                   (komi       "get_komi")
+                   (handicap   "get_handicap")))
+        (destructuring-bind (prop q) x
+          (set prop (string-to-number (gnugo-query q))))))
     (gnugo-put :diamond (substring (process-name (gnugo-get :proc)) 5))
     (gnugo-put :gnugo-color (gnugo-other (gnugo-get :user-color)))
     (gnugo-put :highlight-last-move-spec

reply via email to

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