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

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

[elpa] externals/gnugo 36a2fd5 291/357: [gnugo int] Accomodate XPM w/ :c


From: Stefan Monnier
Subject: [elpa] externals/gnugo 36a2fd5 291/357: [gnugo int] Accomodate XPM w/ :color-symbols property.
Date: Sun, 29 Nov 2020 14:51:41 -0500 (EST)

branch: externals/gnugo
commit 36a2fd5bcdd71f0201bc5d54f7cab552232f2d85
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo int] Accomodate XPM w/ :color-symbols property.
    
    * packages/gnugo/gnugo.el (gnugo-venerate):
    ...here, propagating the foreground :color-symbols
    and value, if available, to the new XPM.
---
 gnugo.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 304d34e..f6fafaa 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -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.



reply via email to

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