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

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

[elpa] 01/02: [gnugo int] Decruft: Drop unused local var.


From: Thien-Thi Nguyen
Subject: [elpa] 01/02: [gnugo int] Decruft: Drop unused local var.
Date: Fri, 18 Apr 2014 09:05:10 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 36568045ca62f641fa9f053e7e5107094e4714f0
Author: Thien-Thi Nguyen <address@hidden>
Date:   Thu Apr 17 18:40:22 2014 +0200

    [gnugo int] Decruft: Drop unused local var.
    
    From inception 2014-04-15, "New command:
    ‘C-c C-a’ (gnugo-toggle-abdication)".
    
    * packages/gnugo/gnugo.el (gnugo-toggle-abdication):
    Drop unused local var ‘ucolor’; also, don't bother
    destructuring :waiting; instead, just check its truth value.
---
 packages/gnugo/gnugo.el |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index a6fa944..be114cd 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -2295,17 +2295,13 @@ This is to ensure that the user is the next to play 
after disabling."
         (warning ""))
     (if abd
         ;; disable
-        (destructuring-bind (gcolor ucolor &optional color . suggestion)
-            (list* (gnugo-get :gnugo-color)
-                   (gnugo-get :user-color)
-                   (gnugo-get :waiting))
-          (assert (not suggestion))
+        (let ((gcolor (gnugo-get :gnugo-color)))
           (when (string= last-mover gcolor)
             (gnugo--ERR-wait gcolor "Sorry, too soon"))
           (when (timerp abd)
             (cancel-timer abd))
           (gnugo--forget :abd)
-          (unless color
+          (unless (gnugo-get :waiting)
             (gnugo-get-move gcolor)))
       ;; enable
       (gnugo--gate-game-over t)



reply via email to

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