[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/02: [gnugo] Fix bug: Don't bother translating move "resign".
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/02: [gnugo] Fix bug: Don't bother translating move "resign". |
Date: |
Wed, 19 Mar 2014 14:28:01 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit a5a9e67da1e9890da9a7858dd8cd89ab450ebfc3
Author: Thien-Thi Nguyen <address@hidden>
Date: Wed Mar 19 15:01:44 2014 +0100
[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’.
---
packages/gnugo/NEWS | 1 +
packages/gnugo/gnugo.el | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/packages/gnugo/NEWS b/packages/gnugo/NEWS
index 799cb56..f891f09 100644
--- a/packages/gnugo/NEWS
+++ b/packages/gnugo/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/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index c12c5e7..c60df4b 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/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))