emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 06/07: [gnugo int] Use ‘numbe r-sequence’ more.


From: Thien-Thi Nguyen
Subject: [elpa] 06/07: [gnugo int] Use ‘numbe r-sequence’ more.
Date: Thu, 06 Feb 2014 10:39:45 +0000

ttn pushed a commit to branch ttn-gnugo
in repository elpa.

commit a7b702a3c8803418ae109391eba096f0ffb23bc4
Author: Thien-Thi Nguyen <address@hidden>
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/ChangeLog |   10 ++++++++++
 packages/gnugo/gnugo.el  |    9 ++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/packages/gnugo/ChangeLog b/packages/gnugo/ChangeLog
index df46f5c..0cc3d17 100644
--- a/packages/gnugo/ChangeLog
+++ b/packages/gnugo/ChangeLog
@@ -1,5 +1,15 @@
 2014-02-06  Thien-Thi Nguyen  <address@hidden>
 
+       [gnugo int] Use ‘number-sequence’ more.
+
+       * 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.
+
+2014-02-06  Thien-Thi Nguyen  <address@hidden>
+
        [gnugo int] Drop unused local var.
 
        * gnugo.el (gnugo-venerate): ...here, named ‘lb’.
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]