[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 66e1788bd6 103/182: Rename variable in advice to not o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 66e1788bd6 103/182: Rename variable in advice to not override original. |
Date: |
Tue, 13 Dec 2022 03:59:34 -0500 (EST) |
branch: elpa/flx
commit 66e1788bd6266341e6b7abe372aab315f7c854c4
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>
Rename variable in advice to not override original.
---
flx-ido.el | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/flx-ido.el b/flx-ido.el
index 1cfbe99f98..3db624bb34 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -36,7 +36,8 @@
;;; Acknowledgments
-;; Scott Frazer's blog entry
http://scottfrazersblog.blogspot.com.au/2009/12/emacs-better-ido-flex-matching.html
+;; Scott Frazer's blog entry
+;;
http://scottfrazersblog.blogspot.com.au/2009/12/emacs-better-ido-flex-matching.html
;; provided a lot of inspiration.
;;
;; ido-hacks was helpful for ido optimization and fontification ideas
@@ -219,26 +220,24 @@ non-nil."
ad-do-it
(let* ((query ido-text)
(original-items (ad-get-arg 0))
- (foo (ad-get-arg 0))
- filtered-items
- items)
+ ad-filtered-items
+ ad-items)
(flx-ido-debug "id-set-matches-1 sees %s items" (length original-items))
- (setq items (cond ((flx-ido-is-prefix-match query (car flx-ido-last-run))
- (cdr flx-ido-last-run))
- ((< (length original-items) flx-ido-threshold)
- original-items)
- (t
- ;; Why??? does not work if I don't set it here.
- (ad-set-arg 0 original-items)
- (setq filtered-items ad-do-it)
- (if (< (length filtered-items) flx-ido-threshold)
- filtered-items
- :too-big))))
- (if (eq items :too-big)
+ (setq ad-items (cond ((flx-ido-is-prefix-match query (car
flx-ido-last-run))
+ (cdr flx-ido-last-run))
+ ((< (length original-items) flx-ido-threshold)
+ original-items)
+ (t
+ ;; filter using flex, then apply flx if list is
short enough.
+ (setq ad-filtered-items ad-do-it)
+ (if (< (length ad-filtered-items)
flx-ido-threshold)
+ ad-filtered-items
+ :too-big))))
+ (if (eq ad-items :too-big)
(progn
(flx-ido-reset)
- (setq ad-return-value filtered-items))
- (setq ad-return-value (flx-ido-match query items))
+ (setq ad-return-value ad-filtered-items))
+ (setq ad-return-value (flx-ido-match query ad-items))
(setq flx-ido-last-run (cons query ad-return-value))))
(flx-ido-debug "id-set-matches-1 returning %s " ad-return-value)))
- [nongnu] elpa/flx 17f5c9cb2a 162/182: Merge pull request #102 from tarsiiformes/typos, (continued)
- [nongnu] elpa/flx 17f5c9cb2a 162/182: Merge pull request #102 from tarsiiformes/typos, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx c7e8574da3 171/182: Shorten long lines, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 1be7b124a2 181/182: Merge pull request #110 from skangas/license-fixes, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7b44a5abb2 182/182: Merge pull request #109 from skangas/bump-version, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx db1a328e41 145/182: Revert "enable lexical-binding", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f6cd01d759 146/182: Merge branch 'perf/dynamic-programming' into 0.6, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx a3d8aa0f9a 164/182: Remove unused and deprecated ‘cl’ library, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 572f5e6013 170/182: Prevent non-heading comments from being treated as such, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx c342eb02a9 179/182: Enforce use of spaces for indentation, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx abd4fe8c2d 085/182: Improve flx-ido-narrowed-matches-hash doc., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 66e1788bd6 103/182: Rename variable in advice to not override original.,
ELPA Syncer <=
- [nongnu] elpa/flx 61e7db4922 111/182: Bump version to 0.5., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 64ccdd3a0d 116/182: Revert "Stabilise search results when scores are equal.", ELPA Syncer, 2022/12/13