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

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

[elpa] master cf2d50b 25/40: Change the overlay's "underlying face" in a


From: Dmitry Gutov
Subject: [elpa] master cf2d50b 25/40: Change the overlay's "underlying face" in a better way
Date: Thu, 2 Jan 2020 18:57:03 -0500 (EST)

branch: master
commit cf2d50b81be361675a7ffec3b1854ff39c1942b0
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Change the overlay's "underlying face" in a better way
    
    For compatibility with Emacs 27's :extend mechanics.
    
    https://debbugs.gnu.org/38563#60
---
 company.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 80398a3..5350254 100644
--- a/company.el
+++ b/company.el
@@ -2545,6 +2545,7 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
                        right)))
     (setq width (+ width margin (length right)))
 
+    ;; TODO: Use add-face-text-property in Emacs 24.4
     (font-lock-append-text-property 0 width 'mouse-face
                                     'company-tooltip-mouse
                                     line)
@@ -2727,8 +2728,6 @@ If SHOW-VERSION is non-nil, show the version in the echo 
area."
     (let ((str (concat (when nl " \n")
                        (mapconcat 'identity (nreverse new) "\n")
                        "\n")))
-      ;; Use add-face-text-property in Emacs 24.4
-      (font-lock-append-text-property 0 (length str) 'face 'default str)
       (when nl (put-text-property 0 1 'cursor t str))
       str)))
 
@@ -2939,6 +2938,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
           (overlay-put ov 'display disp)
         (overlay-put ov 'after-string disp)
         (overlay-put ov 'invisible t))
+      (overlay-put ov 'face 'default)
       (overlay-put ov 'window (selected-window)))))
 
 (defun company-pseudo-tooltip-guard ()



reply via email to

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