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

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

[elpa] externals/gnugo 4d5f998 217/357: [gnugo int] Decruft: Drop unused


From: Stefan Monnier
Subject: [elpa] externals/gnugo 4d5f998 217/357: [gnugo int] Decruft: Drop unused local var.
Date: Sun, 29 Nov 2020 14:51:25 -0500 (EST)

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

    [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.
---
 gnugo.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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