[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx af1010e4ad 035/182: Reverting "fix `ido-merge-work-dir
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx af1010e4ad 035/182: Reverting "fix `ido-merge-work-directories`" |
Date: |
Tue, 13 Dec 2022 03:59:22 -0500 (EST) |
branch: elpa/flx
commit af1010e4ad5ff953c8473b34ae40dc080ef3f530
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
Reverting "fix `ido-merge-work-directories`"
Revert "fix `ido-merge-work-directories`"
This reverts commit a1ac8f97ecb4a0cbb4764210048484fe96074c65.
---
flx-ido.el | 45 +++++++++++++++++++--------------------------
1 file changed, 19 insertions(+), 26 deletions(-)
diff --git a/flx-ido.el b/flx-ido.el
index d4940b1c7a..a8bea9df0d 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -13,7 +13,7 @@
;; Version: 0.1
;; Last-Updated:
;; By:
-;; Update #: 17
+;; Update #: 15
;; URL:
;; Keywords:
;; Compatibility:
@@ -117,25 +117,22 @@ item, in which case, the ending items are deleted."
(defun flx-ido-decorate (things &optional clear)
- (if (consp (caar things))
- (mapcar 'car things)
- (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
- (substring-no-properties thing)
- ;; copy the string in case it's "pure"
- (flx-propertize (copy-sequence (car thing)) (cdr
thing))))
- (if clear
- (nthcdr decorate-count things)
- (mapcar 'car (nthcdr decorate-count things)))))))
+ (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
+ (substring-no-properties thing)
+ ;; copy the string in case it's "pure"
+ (flx-propertize (copy-sequence (car thing)) (cdr thing))))
+ (if clear
+ (nthcdr decorate-count things)
+ (mapcar 'car (nthcdr decorate-count things))))))
(defun flx-ido-match-internal (query items)
(let* ((matches (loop for item in items
- for string = (if (consp item) (car item) item)
- for score = (flx-score string query flx-file-cache)
+ for score = (flx-score item query flx-file-cache)
if score
collect (cons item score)
into matches
@@ -144,11 +141,6 @@ item, in which case, the ending items are deleted."
(sort matches
(lambda (x y) (> (cadr x) (cadr y))))))))
-(defun flx-ido-cache (query items)
- (if (consp (car items))
- items
- (puthash query items flx-ido-narrowed-matches-hash)))
-
(defun flx-ido-match (query items)
"Better sorting for flx ido matching."
(if (memq ido-cur-item '(file dir))
@@ -159,12 +151,13 @@ item, in which case, the ending items are deleted."
(not (gethash query flx-ido-narrowed-matches-hash)))
;; original function reverses list.
(setq items (nreverse (ido-delete-runs items)))
- (flx-ido-cache query items))
- (destructuring-bind (exact res-items)
+ (puthash query items flx-ido-narrowed-matches-hash))
+ (destructuring-bind (exact items)
(flx-ido-narrowed query items)
(if exact ; `ido-rotate' case is covered by
exact match
- res-items
- (flx-ido-cache query (flx-ido-match-internal query res-items))))))
+ items
+ (puthash query (flx-ido-match-internal query items)
+ flx-ido-narrowed-matches-hash)))))
(defvar flx-ido-use t
"Use flx matching for ido.")
- [nongnu] elpa/flx c85273a6e8 009/182: fix helm demo typo, (continued)
- [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
- [nongnu] elpa/flx e80bc0dea4 018/182: more ido optimizations, refactor out flx-propertize, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx a31814e5ef 031/182: update README to say alpha, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 5ab18c3101 024/182: fix over manipulation of strings, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx fd10bf595d 025/182: fix typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx af1010e4ad 035/182: Reverting "fix `ido-merge-work-directories`",
ELPA Syncer <=
- [nongnu] elpa/flx 11f3fad14f 041/182: get complete cache key more smartly, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx c6601c7162 022/182: readme update, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx a13d654096 045/182: disable caching for files/dirs for now, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 1f175f3c65 047/182: add comment about disabling ido faces, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 222f60d28e 055/182: Merge pull request #18 from jschaf/master, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 1d86d3bc09 052/182: cache clearing advice should be "before", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx a0de931381 048/182: bump version, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3b650d13f7 057/182: Merge pull request #23 from bbatsov/doc-improvements, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f3ccfc9168 049/182: make warning less dramatic, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx acf230e2c9 102/182: Lower default flx-ido-threshold -> 500., ELPA Syncer, 2022/12/13