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

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

[elpa] externals/vertico 395421cedc: Use function from minibuffer.el


From: ELPA Syncer
Subject: [elpa] externals/vertico 395421cedc: Use function from minibuffer.el
Date: Thu, 1 Dec 2022 03:58:28 -0500 (EST)

branch: externals/vertico
commit 395421cedc577859667b130a932f0a089a402715
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Use function from minibuffer.el
---
 vertico.el | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/vertico.el b/vertico.el
index 4dbf911e83..e5499aff50 100644
--- a/vertico.el
+++ b/vertico.el
@@ -307,13 +307,6 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
       (vertico--metadata-get 'display-sort-function)
       vertico-sort-function))
 
-(defun vertico--filter-files (files)
-  "Filter FILES by `completion-ignored-extensions'."
-  (let ((re (concat "\\(?:\\(?:\\`\\|/\\)\\.\\.?/\\|"
-                    (regexp-opt completion-ignored-extensions)
-                    "\\)\\'")))
-    (or (seq-remove (lambda (x) (string-match-p re x)) files) files)))
-
 (defun vertico--recompute (pt content)
   "Recompute state given PT and CONTENT."
   (pcase-let* ((before (substring content 0 pt))
@@ -339,7 +332,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
     ;; Filter the ignored file extensions. We cannot use modified predicate 
for this filtering,
     ;; since this breaks the special casing in the 
`completion-file-name-table' for `file-exists-p'
     ;; and `file-directory-p'.
-    (when completing-file (setq all (vertico--filter-files all)))
+    (when completing-file (setq all (completion-pcm--filename-try-filter all)))
     ;; Sort using the `display-sort-function' or the Vertico sort functions
     (setq all (delete-consecutive-dups (funcall (or (vertico--sort-function) 
#'identity) all)))
     ;; Move special candidates: "field" appears at the top, before "field/", 
before default value



reply via email to

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