[Top][All Lists]

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

[elpa] master 6b0c41b 167/184: ivy.el (ivy-sort-file-function-using-ido)

From: Oleh Krehel
Subject: [elpa] master 6b0c41b 167/184: ivy.el (ivy-sort-file-function-using-ido): Make obsolete
Date: Wed, 16 Oct 2019 13:15:16 -0400 (EDT)

branch: master
commit 6b0c41b35052d8bf1ba6ed1601a3beb7b49732e6
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-sort-file-function-using-ido): Make obsolete
    * ivy.el (ivy-sort-functions-alist): Extend :type.
    Re #498
 ivy.el | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/ivy.el b/ivy.el
index c589147..7abc433 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1762,22 +1762,14 @@ Prioritize directories."
       (string< x y))))
-(declare-function ido-file-extension-lessp "ido")
-(defun ivy-sort-file-function-using-ido (x y)
-  "Compare two files X and Y using `ido-file-extensions-order'.
-This function is suitable as a replacement for
-`ivy-sort-file-function-default' in `ivy-sort-functions-alist'."
-  (if (and (bound-and-true-p ido-file-extensions-order))
-      (ido-file-extension-lessp x y)
-    (ivy-sort-file-function-default x y)))
 (defun ivy-string< (x y)
   "Like `string<', but operate on CARs when given cons cells."
   (string< (if (consp x) (car x) x)
            (if (consp y) (car y) y)))
+(define-obsolete-function-alias 'ivy-sort-file-function-using-ido
+    'ido-file-extension-lessp "<2019-10-12 Sat>")
 (defcustom ivy-sort-functions-alist
   '((t . ivy-string<))
   "An alist of sorting functions for each collection function.
@@ -1802,6 +1794,7 @@ See also `ivy-sort-max-size'."
     :value-type (choice
                  (const :tag "Plain sort" string-lessp)
                  (const :tag "File sort" ivy-sort-file-function-default)
+                 (const :tag "File sort using Ido" ido-file-extension-lessp)
                  (const :tag "No sort" nil)
                  (function :tag "Custom function")
                  (repeat (function :tag "Custom function")))))

reply via email to

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