]> code.delx.au - gnu-emacs-elpa/commitdiff
[gnugo int] Accomodate XPM w/ :color-symbols property.
authorThien-Thi Nguyen <ttn@gnu.org>
Sun, 18 May 2014 10:19:44 +0000 (12:19 +0200)
committerThien-Thi Nguyen <ttn@gnu.org>
Sun, 18 May 2014 10:19:44 +0000 (12:19 +0200)
* packages/gnugo/gnugo.el (gnugo-venerate):
...here, propagating the foreground :color-symbols
and value, if available, to the new XPM.

packages/gnugo/gnugo.el

index 304d34eb9640214f0c410f4f8c998d15cbd5efaa..f6fafaaf25493c7fc7f7acb9fa6578995d2fbe7e 100644 (file)
@@ -1455,7 +1455,9 @@ This fails if the monkey is on the current branch
   (let* ((fg-yy (gnugo-yy yin yang))
          (fg-disp (or (get fg-yy 'display)
                       (get fg-yy 'do-not-display)))
-         (fg-data (plist-get (cdr fg-disp) :data))
+         (fg-props (cdr fg-disp))
+         (fg-data (plist-get fg-props :data))
+         (c-symbs (plist-get fg-props :color-symbols))
          (bg-yy (gnugo-yy yin (gnugo-yang ?.)))
          (bg-disp (or (get bg-yy 'display)
                       (get bg-yy 'do-not-display)))
@@ -1483,7 +1485,10 @@ This fails if the monkey is on the current branch
         (aset new sx (aref bg-data sb)))
       (incf sx)
       (incf sb))
-    (create-image new 'xpm t :ascent 'center)))
+    (apply 'create-image new 'xpm t
+           :ascent 'center (when c-symbs
+                             (list :color-symbols
+                                   c-symbs)))))
 
 (defun gnugo-refresh (&optional nocache)
   "Update GNUGO Board buffer display.