branch: elpa/popup commit f2fc1541fe510de9750c3a2499231053ad9f6fee Author: Takafumi Arakaki <aka....@gmail.com> Commit: Takafumi Arakaki <aka....@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 ? )