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

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

[nongnu] elpa/helm 41c2aaccf0 3/3: Fix as well helm-dynamic-completion w


From: ELPA Syncer
Subject: [nongnu] elpa/helm 41c2aaccf0 3/3: Fix as well helm-dynamic-completion with metadata adjustments
Date: Thu, 12 Dec 2024 13:02:37 -0500 (EST)

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

    Fix as well helm-dynamic-completion with metadata adjustments
---
 helm-lib.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index a0264cfcd2..9727b08fd1 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -2216,6 +2216,12 @@ Also `helm-completion-style' settings have no effect 
here,
            (nosort (eq metadata 'nosort))
            (compsfn (lambda (str pred _action)
                       (let* ((completion-ignore-case 
(helm-set-case-fold-search))
+                             ;; Use a copy of metadata to avoid accumulation of
+                             ;; adjustment in metadata (This is not needed in
+                             ;; emacs-31+, it has been fixed in emacsbug
+                             ;; #74718). This also avoid the flex adjustment fn
+                             ;; reusing the previous sort fn.
+                             (md (copy-sequence metadata))
                              (comps (completion-all-completions
                                      str
                                      (if (functionp collection)
@@ -2223,12 +2229,12 @@ Also `helm-completion-style' settings have no effect 
here,
                                        collection)
                                      pred
                                      (or point 0)
-                                     (or (and (listp metadata) metadata)
+                                     (or (and (consp md) md)
                                          (setq metadata '(metadata)))))
                              (last-data (last comps))
                              (sort-fn (unless nosort
                                         (completion-metadata-get
-                                         metadata 'display-sort-function)))
+                                         md 'display-sort-function)))
                              all)
                         (when (cdr last-data)
                           (setcdr last-data nil))



reply via email to

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