[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)
- [elpa] branch master updated (8dd2888 -> 2c6fa1d), Thien-Thi Nguyen, 2014/04/23
- [elpa] 02/08: [gnugo int] Use ‘destr ucturing-bind’ more., Thien-Thi Nguyen, 2014/04/23
- [elpa] 03/08: [gnugo] Fix bug: DTRT for s uggestion ‘nowarp’ check.,
Thien-Thi Nguyen <=
- [elpa] 05/08: [gnugo] On disable, transform in-flight user-move into suggestion., Thien-Thi Nguyen, 2014/04/23
- [elpa] 01/08: [gnugo] Allow user to move for GNU Go., Thien-Thi Nguyen, 2014/04/23
- [elpa] 08/08: [gnugo maint] Update HACKING; nfc., Thien-Thi Nguyen, 2014/04/23
- [elpa] 04/08: [gnugo] Allow user to request suggestion for GNU Go., Thien-Thi Nguyen, 2014/04/23
- [elpa] 06/08: [gnugo] Fix bug: Use ‘ gnugo-gate’ for abdication enable., Thien-Thi Nguyen, 2014/04/23
- [elpa] 07/08: [gnugo int] Use ‘gnugo -current-player’ more., Thien-Thi Nguyen, 2014/04/23