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

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

[elpa] externals/gnugo 06586e9 093/357: [gnugo] Fix bug: Don't bother tr


From: Stefan Monnier
Subject: [elpa] externals/gnugo 06586e9 093/357: [gnugo] Fix bug: Don't bother translating move "resign".
Date: Sun, 29 Nov 2020 14:50:56 -0500 (EST)

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

    [gnugo] Fix bug: Don't bother translating move "resign".
    
    * packages/gnugo/gnugo.el
    (gnugo-move-history as-pos-maybe): New internal func.
    (gnugo-move-history next): Use ‘as-pos-maybe’.
---
 NEWS     | 1 +
 gnugo.el | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 799cb56..f891f09 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Hint: (highlight-phrase 
"[0-9][.][0-9][.][0-9]+\\|[0-9]+[.][.][0-9]+"
   - bugfixes
     - don't special-case property value type ‘none’
     - handle subtrees on write
+    - display "resign" as "resign" in move history (amazing!)
   - new keybinding for ‘gnugo-undo-one-move’: M-u
   - ‘gnugo-undo-one-move’ can optionally switch colors
   - ‘gnugo-move-history’ returns last two moves w/ RSEL ‘two’
diff --git a/gnugo.el b/gnugo.el
index c12c5e7..c60df4b 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -655,10 +655,13 @@ For all other values of RSEL, do nothing and return nil."
                         (format "%c%d"
                                 (+ ?A (- (if (> ?i col) col (1+ col)) ?a))
                                 (- size (- (aref cc 1) ?a)))))
+         (as-pos-maybe (x) (if (string= "resign" x)
+                               x
+                             (as-pos x)))
          (next (byp) (when (setq node (caar mem)
                                  mprop (or (assq :B node)
                                            (assq :W node)))
-                       (setq move (as-pos (cdr mprop))
+                       (setq move (as-pos-maybe (cdr mprop))
                              mem (cdr mem))
                        (push (if byp
                                  (format "%s%s" move (car mprop))



reply via email to

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