[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 39/51: [gnugo] Don't show underscore in group-animation message.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 39/51: [gnugo] Don't show underscore in group-animation message. |
Date: |
Mon, 24 Feb 2014 12:30:24 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 257598c91ac9d3b9655a8fe68c6fbb3cf6d53366
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/gnugo.el | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
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.
- [elpa] 27/51: [gnugo int] Hang the sync-return-stash on the process object., (continued)
- [elpa] 27/51: [gnugo int] Hang the sync-return-stash on the process object., Thien-Thi Nguyen, 2014/02/24
- [elpa] 22/51: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 29/51: [gnugo] Indicate buffer not modified after load., Thien-Thi Nguyen, 2014/02/24
- [elpa] 30/51: [gnugo maint] Update NEWS file; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 34/51: [gnugo int] Use ‘set-p rocess-query-on-exit-flag’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 33/51: [gnugo int] Zonk unused local var., Thien-Thi Nguyen, 2014/02/24
- [elpa] 35/51: [gnugo int] Use ‘dolis t’ and ‘destructuring-bind’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 28/51: [gnugo int] Drop leading "*" in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 26/51: [gnugo] Give names and docstr ings to ‘lambda’ commands., Thien-Thi Nguyen, 2014/02/24
- [elpa] 38/51: [gnugo] Fix bug: Relax sync regexp., Thien-Thi Nguyen, 2014/02/24
- [elpa] 39/51: [gnugo] Don't show underscore in group-animation message.,
Thien-Thi Nguyen <=
- [elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl., Thien-Thi Nguyen, 2014/02/24
- [elpa] 37/51: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 32/51: [gnugo] Use ‘user-erro r’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 02/51: Import gnugo.el from ttn-pers-elisp 1.59., Thien-Thi Nguyen, 2014/02/24
- [elpa] 40/51: [gnugo] Use special constructs for keybindings in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 21/51: [gnugo gtp int] Use :post-thunk instead of :post-hook., Thien-Thi Nguyen, 2014/02/24
- [elpa] 31/51: [gnugo int] Add abstraction: gnugo--unclose-game, Thien-Thi Nguyen, 2014/02/24
- [elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another), Thien-Thi Nguyen, 2014/02/24
- [elpa] 42/51: [gnugo int] Use internal macros more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 46/51: [gnugo] New command: ‘ _’ and ‘M-_’ (gnugo-boss-is-near), Thien-Thi Nguyen, 2014/02/24