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

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

[elpa] externals/kind-icon 8a740ca4f2: Specifically prohibit 'unspecifie


From: ELPA Syncer
Subject: [elpa] externals/kind-icon 8a740ca4f2: Specifically prohibit 'unspecified :foreground color for faces
Date: Thu, 24 Nov 2022 12:57:46 -0500 (EST)

branch: externals/kind-icon
commit 8a740ca4f2b14773aedd0849b682c40d3a616cbe
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    Specifically prohibit 'unspecified :foreground color for faces
---
 kind-icon.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/kind-icon.el b/kind-icon.el
index 364670054d..8b34d11134 100644
--- a/kind-icon.el
+++ b/kind-icon.el
@@ -5,7 +5,7 @@
 ;; Author: J.D. Smith <jdtsmith@gmail.com>
 ;; URL: https://github.com/jdtsmith/kind-icon
 ;; Package-Requires: ((emacs "27.1") svg-lib)
-;; Version: 0.1.8
+;; Version: 0.1.9
 ;; Keywords: completion
 
 ;; kind-icon is free software: you can redistribute it
@@ -261,11 +261,13 @@ background-color."
        (if-let ((map (assq kind kind-icon-mapping))
                 (plist (cddr map)))
            (let* ((kind-face (plist-get plist :face))
-                  (col (or
-                        (and kind-face
-                             (face-attribute kind-face :foreground nil t))
-                        (and kind-icon-default-face
-                             (face-attribute kind-icon-default-face 
:foreground nil t))
+                  (col (or 
+                        (cl-loop for face in `(,kind-face 
,kind-icon-default-face)
+                                 for fcol = (if-let ((face)
+                                                     (c (face-attribute face 
:foreground nil t))
+                                                     ((not (eq c 
'unspecified))))
+                                                c)
+                                 if fcol return fcol finally return nil)
                         (frame-parameter nil 'foreground-color)))
                   (kind-face-bg (and kind-face
                                      (face-attribute kind-face :background nil 
t)))



reply via email to

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