[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flx 7424f54816 079/182: flx-ido: don't require cl; flx req
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flx 7424f54816 079/182: flx-ido: don't require cl; flx requires it anyway |
Date: |
Tue, 13 Dec 2022 03:59:32 -0500 (EST) |
branch: elpa/flx
commit 7424f5481647866f38fd7d6597c0fab29591f1be
Author: Ramkumar Ramachandra <artagnon@gmail.com>
Commit: Ramkumar Ramachandra <artagnon@gmail.com>
flx-ido: don't require cl; flx requires it anyway
Also prefix various functions with "cl-", and add a Package-Requires
header.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
flx-ido.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/flx-ido.el b/flx-ido.el
index b4bb146983..d9fc731c03 100644
--- a/flx-ido.el
+++ b/flx-ido.el
@@ -8,7 +8,7 @@
;; Created: Sun Apr 21 20:38:36 2013 (+0800)
;; Version: 0.2
;; URL: https://github.com/lewang/flx
-;; Package-Requires: ((flx "0.1"))
+;; Package-Requires: ((flx "0.1") (cl-lib "0.3"))
;; This file is NOT part of GNU Emacs.
@@ -54,7 +54,6 @@
;;; Code:
-(eval-when-compile (require 'cl))
(require 'ido)
(require 'flx)
@@ -97,7 +96,7 @@ item, in which case, the ending items are deleted."
best-match
exact
res)
- (loop for key being the hash-key of flx-ido-narrowed-matches-hash
+ (cl-loop for key being the hash-key of flx-ido-narrowed-matches-hash
do (when (and (>= (length query-key) (length key))
(eq t
(compare-strings query-key 0 (min (length
query-key)
@@ -109,7 +108,7 @@ item, in which case, the ending items are deleted."
(when (= (length key)
(length query-key))
(setq exact t)
- (return))))
+ (cl-return))))
(setq res (cond (exact
(gethash best-match flx-ido-narrowed-matches-hash))
(best-match
@@ -127,7 +126,7 @@ item, in which case, the ending items are deleted."
(let ((decorate-count (min ido-max-prospects
(length things))))
(nconc
- (loop for thing in things
+ (cl-loop for thing in things
for i from 0 below decorate-count
collect (if clear
(flx-propertize thing nil)
@@ -141,7 +140,7 @@ item, in which case, the ending items are deleted."
(defun flx-ido-match-internal (query items)
(if (< (length items) flx-ido-threshhold)
- (let* ((matches (loop for item in items
+ (let* ((matches (cl-loop for item in items
for string = (if (consp item) (car item) item)
for score = (flx-score string query flx-file-cache)
if score
@@ -152,7 +151,7 @@ item, in which case, the ending items are deleted."
(sort matches
(lambda (x y) (> (cadr x) (cadr y)))))))
(let ((regexp (mapconcat 'identity (split-string query "" t) ".*")))
- (loop for item in items
+ (cl-loop for item in items
if (string-match regexp (if (consp item) (car item) item))
collect item
into matches
@@ -168,7 +167,7 @@ item, in which case, the ending items are deleted."
(defun flx-ido-match (query items)
"Better sorting for flx ido matching."
- (destructuring-bind (exact res-items)
+ (cl-destructuring-bind (exact res-items)
(flx-ido-narrowed query items)
(flx-ido-cache query (if exact
res-items
- [nongnu] elpa/flx 225fae97c9 070/182: Mention Marmalade in the README, (continued)
- [nongnu] elpa/flx 225fae97c9 070/182: Mention Marmalade in the README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 43f78d4815 090/182: Touch-up commentary., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx dd428a8cc6 095/182: Add some debug statements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3054a8038d 112/182: Fix typo in README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f0c3157268 114/182: Increase default flx-ido-threshold to 6000, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f5fda2897f 125/182: enable lexical-binding, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 3cd3bf7687 129/182: add perf test-case, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 2b31df9ed0 140/182: Make dynamic programming test even more "difficult", ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx cd557fcb00 051/182: fix C-SPC, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 9e7749e9e6 067/182: Merge pull request #27 from bbatsov/fix-capital-check, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7424f54816 079/182: flx-ido: don't require cl; flx requires it anyway,
ELPA Syncer <=
- [nongnu] elpa/flx 3bcaf03434 002/182: add readme, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx bdfd9d98aa 014/182: add travis status image, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 6189f05c7e 004/182: add flx, ido implementation and helm experiment, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 4c67675437 032/182: add GC tuning information to README, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 114cf369cb 020/182: add ido installation instructions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 7452ab1c79 021/182: README update, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx f566207c82 015/182: travis config update, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 01eef11b96 033/182: small efficiency fix, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx 44951ac311 042/182: simplify caching, ELPA Syncer, 2022/12/13
- [nongnu] elpa/flx cc3258bb10 038/182: cache key should be based on whole input, ELPA Syncer, 2022/12/13