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

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

[elpa] externals/gnugo 5157534 241/357: [gnugo int] Use ‘destructuring-


From: Stefan Monnier
Subject: [elpa] externals/gnugo 5157534 241/357: [gnugo int] Use ‘destructuring-bind’ more.
Date: Sun, 29 Nov 2020 14:51:30 -0500 (EST)

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

    [gnugo int] Use ‘destructuring-bind’ more.
    
    * packages/gnugo/gnugo.el (gnugo-gate): ...here,
    for :waiting check, in the process making it player-agnostic.
---
 gnugo.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index ae962fc..7240755 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -360,12 +360,13 @@ Handle the big, slow-to-render, and/or uninteresting ones 
specially."
     (user-error "Wrong buffer -- try M-x gnugo"))
   (unless (gnugo-get :proc)
     (user-error "No \"gnugo\" process!"))
-  (let ((slow (gnugo-get :waiting)))
-    (when slow
-      (gnugo--ERR-wait (gnugo-get :user-color)
-                       (if (cdr slow)
-                           "Still thinking"
-                         "Not your turn yet"))))
+  (destructuring-bind (&optional color . suggestion)
+      (gnugo-get :waiting)
+    (when color
+      (gnugo--ERR-wait
+       color (if suggestion
+                 "Still thinking"
+               "Not your turn yet"))))
   (gnugo--gate-game-over in-progress-p))
 
 (defun gnugo-sentinel (proc string)



reply via email to

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