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

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

[nongnu] elpa/helm 92c6df31a6 3/8: Use helm-make-separator in helm-M-x-t


From: ELPA Syncer
Subject: [nongnu] elpa/helm 92c6df31a6 3/8: Use helm-make-separator in helm-M-x-transformer-1
Date: Fri, 8 Mar 2024 07:00:22 -0500 (EST)

branch: elpa/helm
commit 92c6df31a6a0fd239e484e389467602f9b1bcb70
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Use helm-make-separator in helm-M-x-transformer-1
---
 helm-command.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index 8455346fcb..fafadc728c 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -134,14 +134,12 @@ Note that SORT should not be used when fuzzy matching 
because
 fuzzy matching is running its own sort function with a different
 algorithm."
   (with-helm-current-buffer
-    (cl-loop with max-len = (when helm-M-x-show-short-doc
-                              (helm-in-buffer-get-longest-candidate))
-             with local-map = (helm-M-x-current-mode-map-alist)
+    (cl-loop with local-map = (helm-M-x-current-mode-map-alist)
              for cand in candidates
              for local-key  = (car (rassq cand local-map))
              for key        = (substitute-command-keys (format "\\[%s]" cand))
              for sym        = (intern (if (consp cand) (car cand) cand))
-             for doc = (when max-len
+             for doc = (when helm-M-x-show-short-doc
                          (helm-get-first-line-documentation (intern-soft 
cand)))   
              for disp       = (if (or (eq sym major-mode)
                                       (and (memq sym minor-mode-list)
@@ -154,7 +152,7 @@ algorithm."
              (cons (cond ((and (string-match "^M-x" key) local-key)
                           (propertize (format "%s%s%s %s"
                                               disp
-                                              (if doc (make-string (+ 1 (- 
max-len (length cand))) ? ) "")
+                                              (if doc (helm-make-separator 
cand) "")
                                               (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
                                               (propertize
                                                " " 'display
@@ -163,12 +161,12 @@ algorithm."
                          ((and (string-match "^M-x" key) (not (string= key 
"M-x")))
                           (propertize (format "%s%s%s"
                                               disp
-                                              (if doc (make-string (+ 1 (- 
max-len (length cand))) ? ) "")
+                                              (if doc (helm-make-separator 
cand) "")
                                               (if doc (propertize doc 'face 
'helm-M-x-short-doc) ""))
                                       'match-part disp))
                          (t (propertize (format "%s%s%s %s"
                                                 disp
-                                                (if doc (make-string (+ 1 (- 
max-len (length cand))) ? ) "")
+                                                (if doc (helm-make-separator 
cand) "")
                                                 (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
                                                 (propertize
                                                  " " 'display



reply via email to

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