[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo ab1f4c2 242/357: [gnugo] Fix bug: DTRT for sugge
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo ab1f4c2 242/357: [gnugo] Fix bug: DTRT for suggestion ‘nowarp’ check. |
Date: |
Sun, 29 Nov 2020 14:51:30 -0500 (EST) |
branch: externals/gnugo
commit ab1f4c2bfbae89ff9f56941cdbd9fd7dd5a342c9
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[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.
---
gnugo.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 7240755..6387646 100644
--- a/gnugo.el
+++ b/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] externals/gnugo 843cd96 163/357: [gnugo frolic int] Add abstraction: gnugo--sideways, (continued)
- [elpa] externals/gnugo 843cd96 163/357: [gnugo frolic int] Add abstraction: gnugo--sideways, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo eb13b8e 180/357: [gnugo] Dropped command: ‘t’ (gnugo-toggle-dead-group), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6c7e102 181/357: [gnugo int] Rename :waitingp to :waiting; save color there., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 425731b 196/357: [gnugo int] Add abstraction: gnugo--ERR-wait, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3f3af4b 208/357: [gnugo int] Remove from ‘gnugo-state’ instead of setting to nil., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f28d241 223/357: [gnugo int] Decruft: Don't set provisional :last-user-bpos., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 8211cb9 224/357: [gnugo int] Couple :center-position and :SZ jamming., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 536960c 230/357: [gnugo int] Fix bug: On -l/--infile, inhibit first move if game over., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 50cc2b3 233/357: [gnugo int] Add abstraction: gnugo--q/ue, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 3903907 235/357: [gnugo] Validate position arg of GTP commands ‘undo’, ‘gg-undo’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo ab1f4c2 242/357: [gnugo] Fix bug: DTRT for suggestion ‘nowarp’ check.,
Stefan Monnier <=
- [elpa] externals/gnugo e814724 243/357: [gnugo] Allow user to request suggestion for GNU Go., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5157534 241/357: [gnugo int] Use ‘destructuring-bind’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6c99d78 251/357: [gnugo int] Add abstraction: gnugo--no-worries, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9f5fcfc 250/357: [gnugo int] Add abstraction: gnugo--resignp, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2612c6b 263/357: [gnugo] Replace abdication w/ Assist and Zombie minor modes., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b586e0c 268/357: [gnugo] Refuse to climb towards root when in Assist mode., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo af7aa4a 267/357: [gnugo] Fix bug: On role switch, flip karma after roles., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo b6ac4ac 283/357: [gnugo frolic] Add command to navigate to end of branch., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5414994 277/357: [gnugo] Handle function for ‘gnugo-xpms’ value., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo f42837f 280/357: [gnugo int] Mention ‘gnugo-frolic-mode-map’ in Commentary; nfc., Stefan Monnier, 2020/11/29