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

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

[elpa] 02/08: [gnugo int] Use ‘destr ucturing-bind’ more.


From: Thien-Thi Nguyen
Subject: [elpa] 02/08: [gnugo int] Use ‘destr ucturing-bind’ more.
Date: Wed, 23 Apr 2014 09:00:22 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 5ce5aabddbd5189b7e45aa475c1f198e67999eaf
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Apr 22 11:45:50 2014 +0200

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

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index ae962fc..7240755 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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]