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

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

[nongnu] elpa/helm 2615aec194 1/2: Revert "Handle annotation-function in


From: ELPA Syncer
Subject: [nongnu] elpa/helm 2615aec194 1/2: Revert "Handle annotation-function in completing-read"
Date: Mon, 14 Nov 2022 12:59:01 -0500 (EST)

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

    Revert "Handle annotation-function in completing-read"
    
    This reverts commit 154b17b6f291d2d5464d323476f50f03a01bce48.
---
 helm-mode.el | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index d3e06b50d8..b9d6d2e031 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -498,14 +498,7 @@ If COLLECTION is an `obarray', a TEST should be needed. 
See `obarray'."
 
 (defun helm-cr-default-transformer (candidates source)
   "Default filter candidate function for `helm-comp-read'."
-  (let* ((must-match (helm-get-attr 'must-match source))
-         (annotation-function (plist-get completion-extra-properties
-                                         :annotation-function))
-         (max-len (and annotation-function
-                       (or (buffer-local-value 
'helm-candidate-buffer-longest-len
-                                               (get-buffer 
(helm-candidate-buffer)))
-                           (cl-loop for c in candidates
-                                    maximize (length c))))))
+  (let ((must-match (helm-get-attr 'must-match source)))
     (cl-loop for c in candidates
              for cand = (let ((elm (if (stringp c)
                                        (replace-regexp-in-string "\\s\\" "" c)
@@ -513,23 +506,6 @@ If COLLECTION is an `obarray', a TEST should be needed. 
See `obarray'."
                           (cond ((and (stringp elm)
                                       (string-match "\n" elm))
                                  (cons (replace-regexp-in-string "\n" "->" 
elm) c))
-                                (annotation-function
-                                 (cons
-                                  (propertize
-                                   c 'display
-                                   (replace-regexp-in-string
-                                    "\n" " "
-                                    (concat c
-                                            (make-string
-                                             (+ 1 (if (zerop max-len)
-                                                      max-len
-                                                    (- max-len
-                                                       (string-width c))))
-                                             ? )
-                                            (propertize
-                                             (funcall annotation-function c)
-                                             'face 'completions-annotations))))
-                                  c))
                                 (t c)))
              collect cand into lst
              finally return



reply via email to

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