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

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

[elpa] externals/company c4d205a 31/46: Fix company--face-attribute for


From: Dmitry Gutov
Subject: [elpa] externals/company c4d205a 31/46: Fix company--face-attribute for text-scaled faces
Date: Wed, 30 Dec 2020 18:33:09 -0500 (EST)

branch: externals/company
commit c4d205a5088201718f14d2e92ae6af4efaba6355
Author: Henrik Lissner <henrik@lissner.net>
Commit: Henrik Lissner <henrik@lissner.net>

    Fix company--face-attribute for text-scaled faces
    
    Fixes the case where some remaps (like what text-scale does) use a
    face-spec without an :inherit property, causing an "invalid face" error.
---
 company.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index fb39fa8..74d6b6b 100644
--- a/company.el
+++ b/company.el
@@ -2749,7 +2749,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
 (defun company--face-attribute (face attr)
   ;; Like `face-attribute', but accounts for faces that have been remapped to
   ;; another face, a list of faces, or a face spec.
-  (cond ((symbolp face)
+  (cond ((null face) nil)
+        ((symbolp face)
          (let ((remap (cdr (assq face face-remapping-alist))))
            (if remap
                (company--face-attribute



reply via email to

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