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

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

[nongnu] elpa/helm 23909635de 06/11: Display summary in helm-locate-libr


From: ELPA Syncer
Subject: [nongnu] elpa/helm 23909635de 06/11: Display summary in helm-locate-library only when *completions-detailed is enabled
Date: Thu, 14 Sep 2023 06:59:53 -0400 (EDT)

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

    Display summary in helm-locate-library only when *completions-detailed is 
enabled
---
 helm-elisp.el | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/helm-elisp.el b/helm-elisp.el
index 42a3e08992..45e30038ab 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -925,21 +925,23 @@ a string, i.e. the `symbol-name' of any existing symbol."
           :keymap helm-generic-files-map
           :filtered-candidate-transformer
           (lambda (candidates _source)
-            (cl-loop with lgst = (helm-in-buffer-get-longest-candidate)
-                     for c in candidates
-                     for sep = (make-string (1+ (- lgst (length c))) ? )
-                     for bn = (helm-basename (helm-basename c t) t)
-                     for path = (or (assoc-default bn 
helm--locate-library-cache)
-                                    (let ((p (find-library-name bn)))
-                                      (push (cons bn p) 
helm--locate-library-cache)
-                                      p))
-                     for doc = (or (gethash bn helm--locate-library-doc-cache)
-                                   (puthash bn (helm-locate-lib-get-summary 
path)
-                                            helm--locate-library-doc-cache))
-                     for disp = (helm-aand (propertize doc 'face 
'font-lock-warning-face)
-                                           (propertize " " 'display (concat 
sep it))
-                                           (concat bn it))
-                     collect (cons disp path)))
+            (if (or completions-detailed helm-completions-detailed)
+                (cl-loop with lgst = (helm-in-buffer-get-longest-candidate)
+                         for c in candidates
+                         for sep = (make-string (1+ (- lgst (length c))) ? )
+                         for bn = (helm-basename (helm-basename c t) t)
+                         for path = (or (assoc-default bn 
helm--locate-library-cache)
+                                        (let ((p (find-library-name bn)))
+                                          (push (cons bn p) 
helm--locate-library-cache)
+                                          p))
+                         for doc = (or (gethash bn 
helm--locate-library-doc-cache)
+                                       (puthash bn 
(helm-locate-lib-get-summary path)
+                                                
helm--locate-library-doc-cache))
+                         for disp = (helm-aand (propertize doc 'face 
'font-lock-warning-face)
+                                               (propertize " " 'display 
(concat sep it))
+                                               (concat bn it))
+                         collect (cons disp path))
+              candidates))
           :action (helm-actions-from-type-file))
         :buffer "*helm locate library*"))
 



reply via email to

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