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

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

[elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hl


From: Dmitry Gutov
Subject: [elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hlissner/fix-face-helper
Date: Wed, 30 Dec 2020 18:33:09 -0500 (EST)

branch: externals/company
commit 5f5949b6ae8ea9df94c6cb3e01d9cae43623b794
Merge: 053c50d b16b236
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@github.com>

    Merge pull request #1024 from hlissner/fix-face-helper
    
    Fix company--face-attribute for text-scaled faces
---
 company.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index fb39fa8..09c2d46 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
@@ -2802,7 +2803,8 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
     (let* ((nl-face (list
                      :extend t
                      :inverse-video nil
-                     :background (company--face-attribute 'default 
:background)))
+                     :background (or (company--face-attribute 'default 
:background)
+                                     (face-attribute 'default :background nil 
t))))
            (str (apply #'concat
                        (when nl " \n")
                        (cl-mapcan



reply via email to

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