ttn pushed a commit to branch master in repository elpa. commit 9fa079c3c9328041a79cd387104e95b4eb998bbc Author: Thien-Thi Nguyen <t...@gnu.org> Date: Thu Feb 6 10:59:30 2014 +0100
[gnugo int] Use ‘number-sequence’ more. * packages/gnugo/gnugo.el (gnugo-animate-group): For image display ‘spec’ handling, don't map over an exploded string, ignoring the individual characters, and manually toggling the state; instead, map over an integer, using the number's divisibility by two to select. --- packages/gnugo/gnugo.el | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el index 0297ed2..12b7e88 100644 --- a/packages/gnugo/gnugo.el +++ b/packages/gnugo/gnugo.el @@ -1055,12 +1055,11 @@ To start a game try M-x gnugo." (let* ((yin (get-text-property (point) 'gnugo-yin)) (yang (gnugo-yang (char-after))) (up (get (gnugo-yy yin yang t) 'display)) - (dn (get (gnugo-yy yin yang) 'display)) - flip-flop) - (mapcar (lambda (c) - (if (setq flip-flop (not flip-flop)) + (dn (get (gnugo-yy yin yang) 'display))) + (mapcar (lambda (n) + (if (cl-oddp n) dn up)) - (mapcar 'string-to-char spec)))) + (number-sequence 1 (length spec))))) (t spec)))) (cell (list spec)) (ovs (save-excursion