[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/03: [gnugo] Don't show underscore in group-animation message.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 01/03: [gnugo] Don't show underscore in group-animation message. |
Date: |
Tue, 18 Feb 2014 11:22:18 +0000 |
ttn pushed a commit to branch ttn-gnugo
in repository elpa.
commit 1e5166a9b89cb01ab27761906f039745d44f2dd6
Author: Thien-Thi Nguyen <address@hidden>
Date: Mon Feb 17 11:33:56 2014 +0100
[gnugo] Don't show underscore in group-animation message.
* packages/gnugo/gnugo.el (gnugo-animate-group):
Don't take COMMAND; instead, take W/D, a symbol;
construct command w/ it; rework messages accordingly.
(gnugo-worm-stones): Update call to ‘gnugo-animate-group’.
(gnugo-dragon-stones): Likewise.
---
packages/gnugo/ChangeLog | 10 ++++++++++
packages/gnugo/gnugo.el | 18 ++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/packages/gnugo/ChangeLog b/packages/gnugo/ChangeLog
index 347cba8..aad79b2 100644
--- a/packages/gnugo/ChangeLog
+++ b/packages/gnugo/ChangeLog
@@ -1,3 +1,13 @@
+2014-02-17 Thien-Thi Nguyen <address@hidden>
+
+ [gnugo] Don't show underscore in group-animation message.
+
+ * gnugo.el (gnugo-animate-group):
+ Don't take COMMAND; instead, take W/D, a symbol;
+ construct command w/ it; rework messages accordingly.
+ (gnugo-worm-stones): Update call to ‘gnugo-animate-group’.
+ (gnugo-dragon-stones): Likewise.
+
2014-02-16 Thien-Thi Nguyen <address@hidden>
[gnugo] Fix bug: Relax sync regexp.
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 9e813b7..15143ba 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1074,14 +1074,16 @@ To start a game try M-x gnugo."
(gnugo-push-move t "resign")
(gnugo-refresh)))
-(defun gnugo-animate-group (command)
- (message "Computing %s ..." command)
+(defun gnugo-animate-group (w/d)
+ ;; W/D is a symbol, either ‘worm’ or ‘dragon’.
(let* ((pos (gnugo-position))
(orig-b-m-p (buffer-modified-p))
- (stones (if (memq (char-after) '(?X ?O))
- (gnugo-lsquery "%s %s" command pos)
- (user-error "No stone at %s" pos))))
- (message "Computing %s ... %s in group." command (length stones))
+ blurb stones)
+ (unless (memq (char-after) '(?X ?O))
+ (user-error "No stone at %s" pos))
+ (setq blurb (message "Computing %s stones ..." w/d)
+ stones (gnugo-lsquery "%s_stones %s" w/d pos))
+ (message "%s %s in group." blurb (length stones))
(setplist (gnugo-f 'anim) nil)
(let* ((spec (let ((spec (split-string gnugo-animation-string "" t)))
(cond ((gnugo-get :display-using-images)
@@ -1129,7 +1131,7 @@ Signal error if done out-of-turn or if game-over.
See variable `gnugo-animation-string' for customization."
(interactive)
(gnugo-gate)
- (gnugo-animate-group "worm_stones"))
+ (gnugo-animate-group 'worm))
(defun gnugo-worm-data ()
"Display in another buffer data from \"worm\" at current position.
@@ -1144,7 +1146,7 @@ Signal error if done out-of-turn or if game-over.
See variable `gnugo-animation-string' for customization."
(interactive)
(gnugo-gate)
- (gnugo-animate-group "dragon_stones"))
+ (gnugo-animate-group 'dragon))
(defun gnugo-dragon-data ()
"Display in another buffer data from \"dragon\" at current position.