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

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

[nongnu] elpa/popup f2fc154 058/184: Add summary-face keyword argument t


From: ELPA Syncer
Subject: [nongnu] elpa/popup f2fc154 058/184: Add summary-face keyword argument to popup-create-line-string
Date: Wed, 6 Oct 2021 00:01:06 -0400 (EDT)

branch: elpa/popup
commit f2fc1541fe510de9750c3a2499231053ad9f6fee
Author: Takafumi Arakaki <aka.tkf@gmail.com>
Commit: Takafumi Arakaki <aka.tkf@gmail.com>

    Add summary-face keyword argument to popup-create-line-string
---
 popup.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/popup.el b/popup.el
index afddcb4..c651058 100644
--- a/popup.el
+++ b/popup.el
@@ -401,7 +401,14 @@ usual."
                          scroll-bar-char
                          postfix))))
 
-(defun* popup-create-line-string (popup string &key margin-left margin-right 
symbol summary)
+(defun* popup-create-line-string (popup
+                                  string
+                                  &key
+                                  margin-left
+                                  margin-right
+                                  symbol
+                                  summary
+                                  summary-face)
   (let* ((popup-width (popup-width popup))
          (summary-width (string-width summary))
          (content-width (max
@@ -417,6 +424,9 @@ usual."
          (truncated-summary
           (car (popup-substring-by-width
                 summary (max (- popup-width string-width spacing) 0)))))
+    (when summary-face
+      (put-text-property 0 (length truncated-summary)
+                         'face summary-face truncated-summary))
     (concat margin-left
             string
             (make-string spacing ? )



reply via email to

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