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

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

[elpa] externals/popper 76b1a1f1bc 094/102: popper-echo: Tweak popper gr


From: ELPA Syncer
Subject: [elpa] externals/popper 76b1a1f1bc 094/102: popper-echo: Tweak popper group display
Date: Fri, 8 Sep 2023 15:58:56 -0400 (EDT)

branch: externals/popper
commit 76b1a1f1bce412296d564056c76dd174bcf8ec64
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    popper-echo: Tweak popper group display
    
    In addition to strings and symbols, popup groups can now be any
    object with a printable representation, such as a frame or buffer.
    
    Note: The print name of the group is truncated to 20 chars.  It
    might be worth providing an option for this.
---
 popper-echo.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/popper-echo.el b/popper-echo.el
index 615b6bd040..c38e8e6c82 100644
--- a/popper-echo.el
+++ b/popper-echo.el
@@ -132,9 +132,7 @@ off."
                           (cl-remove-if-not #'buffer-live-p)
                           (mapcar #'buffer-name)
                           (delete-dups)))
-         (group (if (and grp-symb (symbolp grp-symb))
-                         (symbol-name grp-symb)
-                       grp-symb))
+         (group (and grp-symb (concat (substring (format "Group (%S" grp-symb) 
0 27) "): ")))
          (open-popup (buffer-name))
          (dispatch-keys-extended (append (cdr popper-echo-dispatch-keys)
                                      (make-list (max 0 (- (length 
buried-popups)
@@ -164,13 +162,12 @@ off."
                                     (propertize "]" 'face 
'popper-echo-area-buried)))
                                  dispatch-keys-extended
                                  buried-popups)))))
-    (let* ((max-width (- (* popper-echo-lines (frame-width))
-                         (if group (+ 13 (length group)) 11)))
+    (let* ((max-width (- (* popper-echo-lines (frame-width)) (if group (length 
group) 11)))
            (plen (length popup-strings))
            (space-p (> max-width plen)))
       (message "%s"
                (concat
-                (if group (format "Group (%s): " group) "Popups: ")
+                (or group "Popups: ")
                 (substring popup-strings 0 (if space-p plen max-width))
                 (unless space-p
                   (propertize "..." 'face 'popper-echo-area-buried)))))



reply via email to

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