[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/03: [gnugo] Drop support for ‘(gnugo-move-history 'count)’.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 03/03: [gnugo] Drop support for ‘(gnugo-move-history 'count)’. |
Date: |
Wed, 16 Apr 2014 07:17:44 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 6abf66e2aaf04b82d47ff616d089ddeabcb0233b
Author: Thien-Thi Nguyen <address@hidden>
Date: Wed Apr 16 09:12:40 2014 +0200
[gnugo] Drop support for ‘(gnugo-move-history 'count)’.
* packages/gnugo/gnugo.el (gnugo-move-history): ...here.
(gnugo-refresh): For ‘~m’, access :sgf-gametree, :monkey directly.
---
packages/gnugo/NEWS | 1 +
packages/gnugo/gnugo.el | 17 ++++++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/packages/gnugo/NEWS b/packages/gnugo/NEWS
index 02c9337..3c51bdf 100644
--- a/packages/gnugo/NEWS
+++ b/packages/gnugo/NEWS
@@ -35,6 +35,7 @@ NB: "RCS: X..Y " means that the particular release includes
- ‘gnugo/sgf-read-file’ renamed to ‘gnugo/sgf-create’ and enhanced
- ‘:sgf-gametree’ internal representation inverted (BI)
- ‘gnugo-magic-undo’ handles SPEC ‘0’
+ - dropped ‘(gnugo-move-history 'count)’ (BI)
- 2.3.1 | 2014-02-27
- portability fixes
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 8047d5f..7e7f446 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -695,10 +695,10 @@ If nil, display the history in the echo area as \"(N
moves)\"
followed by the space-separated list of moves. When called
interactively with a prefix arg (i.e., RSEL is `(4)'), display
similarly, but suffix with the mover (either \":B\" or \":W\").
-If RSEL is the symbol `car' return the most-recent move; if
-`cadr', the next-to-most-recent move; if `count' the number of
-moves thus far; if `two' the last two moves as a list, oldest last.
-
+RSEL may also be a symbol that selects what to return:
+ car -- the most-recent move
+ cadr -- the next-to-most-recent move
+ two -- the last two moves as a list, oldest last
For all other values of RSEL, do nothing and return nil."
(interactive "P")
(let* ((monkey (gnugo-get :monkey))
@@ -726,8 +726,6 @@ For all other values of RSEL, do nothing and return nil."
(`nil (finish nil))
(`car (car (nn)))
(`cadr (nn) (car (nn)))
- (`count (gethash (car mem) (gnugo--tree-mnum
- (gnugo-get :sgf-gametree))))
(`two (nn) (nn) acc)
(_ nil)))))
@@ -1553,7 +1551,12 @@ its move."
(cadr (time-since ws))
"-")))
(?u '(or (gnugo-get :last-waiting) "-"))
- (?m '(gnugo-move-history 'count))))
+ (?m '(let ((tree (gnugo-get :sgf-gametree))
+ (monkey (gnugo-get :monkey)))
+ (gethash (car (aref monkey 0))
+ (gnugo--tree-mnum tree)
+ ;; should be unnecessary
+ "?")))))
acc))
`(let ,(delete-dups (copy-sequence acc))
(format ,cur ,@(reverse (mapcar 'car acc))))))