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

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

[elpa] 03/08: [gnugo] Fix bug: DTRT for s uggestion ‘nowarp’ check.


From: Thien-Thi Nguyen
Subject: [elpa] 03/08: [gnugo] Fix bug: DTRT for s uggestion ‘nowarp’ check.
Date: Wed, 23 Apr 2014 09:00:22 +0000

ttn pushed a commit to branch master
in repository elpa.

commit 1c9fc13ea2ff7235afb476d8ca74d5b9c611dfe7
Author: Thien-Thi Nguyen <address@hidden>
Date:   Tue Apr 22 12:14:58 2014 +0200

    [gnugo] Fix bug: DTRT for suggestion ‘nowarp’ check.
    
    From inception 2014-04-15, "New
    command: ‘S’ (gnugo-request-suggestion)".
    
    * packages/gnugo/gnugo.el (gnugo-get-move-insertion-filter):
    Don't feed ‘cons’ rv to ‘destructuring-bind’; instead,
    drop var ‘pos-or-pass’, repurpose var ‘full’ -- surely
    succumbing to Bad Style :-/, and access :waiting directly.
---
 packages/gnugo/gnugo.el |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 7240755..6387646 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1632,9 +1632,9 @@ its move."
     (let* ((so-far (gnugo-get :get-move-string))
            (full   (gnugo-put :get-move-string (concat so-far string))))
       (when (string-match "^= \\(.+\\)\n\n" full)
-        (destructuring-bind (pos-or-pass color . suggestion)
-            (cons (match-string 1 full)
-                  (gnugo-get :waiting))
+        (setq full (match-string 1 full)) ; POS or "PASS"
+        (destructuring-bind (color . suggestion)
+            (gnugo-get :waiting)
           (gnugo--forget :get-move-string
                          :waiting)
           (if suggestion
@@ -1642,11 +1642,11 @@ its move."
                 (gnugo--rename-buffer-portion t)
                 (unless (or (gnugo--passp full)
                             (eq 'nowarp suggestion))
-                  (gnugo-goto-pos pos-or-pass))
+                  (gnugo-goto-pos full))
                 (message "%sSuggestion: %s"
                          (gnugo-get :diamond)
-                         pos-or-pass))
-            (let* ((donep (gnugo-push-move color pos-or-pass))
+                         full))
+            (let* ((donep (gnugo-push-move color full))
                    (buf (current-buffer)))
               (gnugo--finish-move buf)
               (when (gnugo-get :abd)



reply via email to

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