[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master f6bd64b 164/348: ivy.el (ivy--flx-featurep): New defvar
From: |
Oleh Krehel |
Subject: |
[elpa] master f6bd64b 164/348: ivy.el (ivy--flx-featurep): New defvar |
Date: |
Sat, 8 Apr 2017 11:03:48 -0400 (EDT) |
branch: master
commit f6bd64b53c991e1c10f44239ef302e9c462af62c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy--flx-featurep): New defvar
Re #653
---
ivy.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index e74c0c5..863bb86 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2409,6 +2409,8 @@ The alist VAL is a sorting function with the signature of
(nth 5 (file-attributes f2))
(nth 5 (file-attributes f1)))))))
+(defvar ivy--flx-featurep (require 'flx nil 'noerror))
+
(defun ivy--sort (name candidates)
"Re-sort CANDIDATES by NAME.
All CANDIDATES are assumed to match NAME."
@@ -2416,7 +2418,7 @@ All CANDIDATES are assumed to match NAME."
(when (functionp (ivy-state-collection ivy-last))
(ivy-state-collection ivy-last))))
fun)
- (cond ((and (require 'flx nil 'noerror)
+ (cond ((and ivy--flx-featurep
(eq ivy--regex-function 'ivy--regex-fuzzy))
(ivy--flx-sort name candidates))
((setq fun (cdr (or (assoc key ivy-sort-matches-functions-alist)
@@ -2482,7 +2484,7 @@ Prefer first \"^*NAME\", then \"^NAME\"."
(> (length name) 0)
0)
(and (not (string= name ""))
- (not (and (require 'flx nil 'noerror)
+ (not (and ivy--flx-featurep
(eq ivy--regex-function 'ivy--regex-fuzzy)
(< (length cands) 200)))
ivy--old-cands
@@ -2695,7 +2697,7 @@ SEPARATOR is used to join the candidates."
str))
(cl-incf i)))))
((and
- (require 'flx nil 'noerror)
+ ivy--flx-featurep
(or (eq ivy--regex-function 'ivy--regex-fuzzy)
(and (eq ivy--regex-function 'swiper--re-builder)
(let ((caller (ivy-state-caller ivy-last)))
- [elpa] master d41212e 172/348: ivy.el (ivy--insert-minibuffer): Handle empty string, (continued)
- [elpa] master d41212e 172/348: ivy.el (ivy--insert-minibuffer): Handle empty string, Oleh Krehel, 2017/04/08
- [elpa] master 8632f33 175/348: counsel.el: Update description comment., Oleh Krehel, 2017/04/08
- [elpa] master 89a6830 186/348: counsel.el (counsel-at-git-issue-p): Fix for newer magit, Oleh Krehel, 2017/04/08
- [elpa] master 3d0e4a5 184/348: counsel.el (counsel-locate-action-extern): Update on w32, Oleh Krehel, 2017/04/08
- [elpa] master db9d7b8 188/348: Fix counsel-grep for files with spaces in the name, Oleh Krehel, 2017/04/08
- [elpa] master e7d6dab 185/348: counsel.el (counsel-mode): Add "C-r" bindings, Oleh Krehel, 2017/04/08
- [elpa] master f180451 179/348: swiper.el (swiper-all): Fix window-width in -nw, Oleh Krehel, 2017/04/08
- [elpa] master e11c926 182/348: Allow to "C-y" a "/ssh:" file name, Oleh Krehel, 2017/04/08
- [elpa] master 4e6921f 153/348: ivy.el: Apply alist change to ivy-occur, Oleh Krehel, 2017/04/08
- [elpa] master 36b00cb 155/348: Use EVM in travis to test across multiple Emacs versions, Oleh Krehel, 2017/04/08
- [elpa] master f6bd64b 164/348: ivy.el (ivy--flx-featurep): New defvar,
Oleh Krehel <=
- [elpa] master fc5c8fc 159/348: Fix ivy-occur-press for swiper, Oleh Krehel, 2017/04/08
- [elpa] master e98883f 162/348: Improve fuzzy swiper highlight, Oleh Krehel, 2017/04/08
- [elpa] master 9b28927 187/348: counsel.el (counsel-hydra-heads): Fixup, Oleh Krehel, 2017/04/08
- [elpa] master 00219da 181/348: Fix for older Emacs, Oleh Krehel, 2017/04/08
- [elpa] master 8f87f74 178/348: counsel.el (counsel-git-grep): Update for Windows, Oleh Krehel, 2017/04/08
- [elpa] master 79105a5 208/348: counsel.el (counsel-info-lookup-symbol): Add preselect, Oleh Krehel, 2017/04/08
- [elpa] master 222a5e6 217/348: ivy.el (ivy--virtual-buffers): Move to silence compiler, Oleh Krehel, 2017/04/08
- [elpa] master 35b5d29 230/348: New example to show how to associate values, Oleh Krehel, 2017/04/08
- [elpa] master e9c274a 236/348: Allow to customize ivy-display-function per caller, Oleh Krehel, 2017/04/08
- [elpa] master c14ceac 245/348: Add support for counsel-find-library, Oleh Krehel, 2017/04/08