branch: externals/company
commit c4d205a5088201718f14d2e92ae6af4efaba6355
Author: Henrik Lissner <[email protected]>
Commit: Henrik Lissner <[email protected]>
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