[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm cf39eedbe7 1/3: Ensure the sort function runs in helm
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm cf39eedbe7 1/3: Ensure the sort function runs in helm-completing-read-default-1 |
Date: |
Sun, 6 Aug 2023 19:00:08 -0400 (EDT) |
branch: elpa/helm
commit cf39eedbe75e840d14e21796a24a32b546d7d334
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Ensure the sort function runs in helm-completing-read-default-1
helm-completion--initial-filter now do nothing when afix afun or
file-comp-p are nil.
---
helm-mode.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/helm-mode.el b/helm-mode.el
index 703956200e..71d41a7f6d 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1018,7 +1018,7 @@ dynamically otherwise use
`helm-completing-read-default-2'."
(memq require-match
'(confirm confirm-after-completion)))
1 0)
- :fc-transformer (append (and (or afix afun file-comp-p)
+ :fc-transformer (append (and (or afix afun file-comp-p sort-fn)
(list (lambda (candidates _source)
(helm-completion--initial-filter
(let ((all (copy-sequence
candidates)))
@@ -1894,7 +1894,9 @@ is used."
"Compute COMPS with function AFUN or AFIX unless FILE-COMP-P non nil.
If both AFUN and AFIX are provided only AFIX is used.
-When FILE-COMP-P is provided only filter out dot files."
+When FILE-COMP-P is provided only filter out dot files.
+
+When AFUN, AFIX and FILE-COMP-P are nil return COMPS unmodified."
;; Filter out dot files in file completion. Normally COMPS should be a list
of
;; string but in some cases it is given as a list of strings containing a
list
;; of string e.g. ("a" "b" "c" ("d" "e" "f")) ; This happen in rgrep
@@ -1902,9 +1904,10 @@ When FILE-COMP-P is provided only filter out dot files."
;; avoid e.g. wrong-type argument: stringp '("d" "e" "f")
;; FIXME: If this create a new bug with completion-in-region, flatten COMPS
;; directly in the caller i.e. helm-completing-read-default-1.
- (setq comps (helm-fast-remove-dups
- (helm-flatten-list comps)
- :test 'equal))
+ (when (or afix afun file-comp-p)
+ (setq comps (helm-fast-remove-dups
+ (helm-flatten-list comps)
+ :test 'equal)))
(if file-comp-p
(cl-loop for f in comps
unless (string-match "\\`\\.\\{1,2\\}/\\'" f)