[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 13/13: [gnugo int] Move ‘gnug o-position’ call down-chain.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 13/13: [gnugo int] Move ‘gnug o-position’ call down-chain. |
Date: |
Mon, 21 Apr 2014 21:32:11 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit a1fe7f005d44fd059f91ecbf1d0ebdda20263c30
Author: Thien-Thi Nguyen <address@hidden>
Date: Mon Apr 21 23:35:53 2014 +0200
[gnugo int] Move ‘gnugo-position’ call down-chain.
* packages/gnugo/gnugo.el (gnugo--climb-towards-root):
...into here if SPEC is neither number nor string.
(gnugo-oops, gnugo-fancy-undo): Update accordingly.
---
packages/gnugo/gnugo.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index d926725..345fd9b 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1957,7 +1957,9 @@ If FILENAME already exists, Emacs confirms that you wish
to overwrite it."
2)
spec)
(aref monkey 0))
- (let* ((pos spec)
+ (let* ((pos (if (stringp spec)
+ spec
+ (gnugo-position)))
(hmm (gnugo--mem-with-played-stone pos)))
;; todo: relax ‘gnugo--user-play’ then lift restriction
(unless (eq (gnugo--prop<-color user-color)
@@ -2022,8 +2024,7 @@ Prefix arg means, instead, undo repeatedly up to and
including
the move which placed the stone at point, like `\\[gnugo-fancy-undo]'."
(interactive "P")
(gnugo-gate)
- (gnugo--climb-towards-root (if position
- (gnugo-position)
+ (gnugo--climb-towards-root (unless position
0)
nil t))
@@ -2218,8 +2219,7 @@ which placed the stone at point."
(interactive "P")
(gnugo--climb-towards-root
(cond ((numberp count) count)
- ((consp count) (car count))
- (t (gnugo-position)))))
+ ((consp count) (car count)))))
(defun gnugo-toggle-image-display-command () ; ugh
"Toggle use of images to display the board, then refresh."
- [elpa] 01/13: [gnugo int] Add abstraction: gnugo--prop<-color, (continued)
- [elpa] 01/13: [gnugo int] Add abstraction: gnugo--prop<-color, Thien-Thi Nguyen, 2014/04/21
- [elpa] 03/13: [gnugo int] Fix bug: On -l/--infile, don't set :last-mover., Thien-Thi Nguyen, 2014/04/21
- [elpa] 04/13: [gnugo int] Fix bug: On -l/--infile, inhibit first move if game over., Thien-Thi Nguyen, 2014/04/21
- [elpa] 05/13: [gnugo] Fix bug: DTRT for :last-user-bpos in undo-one-move ME-NEXT., Thien-Thi Nguyen, 2014/04/21
- [elpa] 06/13: [gnugo] Reduce modifier key bouncing for "quick peek" frolics., Thien-Thi Nguyen, 2014/04/21
- [elpa] 09/13: [gnugo] Validate position arg of GTP commands ‘undo’, ‘gg-undo’., Thien-Thi Nguyen, 2014/04/21
- [elpa] 08/13: [gnugo int] Add abstraction: gnugo--mem-with-played-stone, Thien-Thi Nguyen, 2014/04/21
- [elpa] 07/13: [gnugo int] Add abstraction: gnugo--q/ue, Thien-Thi Nguyen, 2014/04/21
- [elpa] 10/13: [gnugo] Internalize ‘g nugo-magic-undo’., Thien-Thi Nguyen, 2014/04/21
- [elpa] 11/13: [gnugo int] Simplify towards-root loop termination check., Thien-Thi Nguyen, 2014/04/21
- [elpa] 13/13: [gnugo int] Move ‘gnug o-position’ call down-chain.,
Thien-Thi Nguyen <=
- [elpa] 12/13: [gnugo int] Centralize some "No stone at POS" errors., Thien-Thi Nguyen, 2014/04/21
- [elpa] 02/13: [gnugo] On SGF load, leave cursor at last user board position., Thien-Thi Nguyen, 2014/04/21