branch: master
commit 23d7c740fcd6e5554989e7a1ac59f5c537df7024
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Fix previous commit
* ivy.el (ido): Don't require 'ido at top-level - it's not used by
default.
(ido-file-extension-lessp): Add declaration.
(ivy-sort-file-function-using-ido): Clean up trailing whitespace.
Fixes #498
Fixes #453
---
ivy.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3e32376..c583fce 100644
--- a/ivy.el
+++ b/ivy.el
@@ -39,7 +39,6 @@
;;; Code:
(require 'cl-lib)
(require 'ffap)
-(require 'ido nil t)
;;* Customization
(defgroup ivy nil
@@ -1139,14 +1138,15 @@ Prioritize directories."
(if (get-text-property 0 'dirp y)
nil
(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 (boundp 'ido-file-extensions-order)
- 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)))