[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx d21ac098df 050/182: add option `flx-ido-use-faces'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx d21ac098df 050/182: add option `flx-ido-use-faces' |
Date: |
Tue, 13 Dec 2022 03:59:27 -0500 (EST) |
branch: elpa/flx
commit d21ac098dfad860cd33aea2d3b16669e96a429c5
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
add option `flx-ido-use-faces'
fixes #17
---
flx-ido.el | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/flx-ido.el b/flx-ido.el
index 2519fb23e5..f6c428c85e 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -13,7 +13,7 @@
;; Version: 0.2
;; Last-Updated:
;; By:
-;; Update #: 52
+;; Update #: 55
;; URL:
;; Keywords:
;; Compatibility:
@@ -68,6 +68,11 @@
(require 'ido)
(require 'flx)
+
+(defcustom flx-ido-use-faces t
+ "Use `flx-highlight-face' to indicate characters contributing to best score."
+ :group 'ido)
+
(unless (fboundp 'ido-delete-runs)
(defun ido-delete-runs (list)
"Delete consecutive runs of same item in list.
@@ -124,17 +129,19 @@ item, in which case, the ending items are deleted."
(defun flx-ido-decorate (things &optional clear)
- (let ((decorate-count (min ido-max-prospects
- (length things))))
- (nconc
- (loop for thing in things
- for i from 0 below decorate-count
- collect (if clear
- (flx-propertize thing nil)
- (flx-propertize (car thing) (cdr thing))))
- (if clear
- (nthcdr decorate-count things)
- (mapcar 'car (nthcdr decorate-count things))))))
+ (if flx-ido-use-faces
+ (let ((decorate-count (min ido-max-prospects
+ (length things))))
+ (nconc
+ (loop for thing in things
+ for i from 0 below decorate-count
+ collect (if clear
+ (flx-propertize thing nil)
+ (flx-propertize (car thing) (cdr thing))))
+ (if clear
+ (nthcdr decorate-count things)
+ (mapcar 'car (nthcdr decorate-count things)))))
+ (mapcar 'car things)))
(defun flx-ido-match-internal (query items)
(let* ((matches (loop for item in items
- [nongnu] elpa/flx 46040d0b09 160/182: Merge pull request #97 from antmak/patch-1, (continued)
- [nongnu] elpa/flx 46040d0b09 160/182: Merge pull request #97 from antmak/patch-1, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 05600ff855 167/182: Merge pull request #103 from phst/add-license-file, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx e3b3f0533e 174/182: Merge pull request #108 from tarsiiformes/cleanup, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 48e10bf54f 177/182: Update to latest version of GPLv3 boilerplate, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 8ee8a877ab 028/182: boost entire match score, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 78dc69a666 023/182: fix query with CAPITAL letters, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 095f2e70f9 040/182: remove text property of selected item, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 50ff90fa08 017/182: add ido cache of narrowed list optimization, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3208d8131e 043/182: make undecorate select item more thorough, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx fb1ded43df 044/182: cache cons cell lists too, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx d21ac098df 050/182: add option `flx-ido-use-faces',
ELPA Syncer <=
- [nongnu] elpa/flx f9bd16221b 063/182: update large collection guidelines, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 27bc47899a 075/182: Merge pull request #37 from artagnon/make, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx abe1a77c02 081/182: Merge pull request #38 from artagnon/cl-lib, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9200e27309 083/182: use "flex" filtering when collection too large, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx c85273a6e8 009/182: fix helm demo typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7110df04e2 005/182: update tests, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx fabca711e9 013/182: fix typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx dc739574ad 011/182: add helm demo without flx, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 955772f489 029/182: optimize full-match boost, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 0519734c5b 030/182: consider runs of capitals to be same word, ELPA Syncer, 2022/12/13