[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 9792b21d2c 1/2: Shorten argument names
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 9792b21d2c 1/2: Shorten argument names |
Date: |
Thu, 7 Dec 2023 12:57:43 -0500 (EST) |
branch: externals/corfu
commit 9792b21d2ca7dbc5fc1b012fa5a569840363a68e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Shorten argument names
---
corfu.el | 6 +++---
extensions/corfu-history.el | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/corfu.el b/corfu.el
index 7911d2fc1d..4b631c6010 100644
--- a/corfu.el
+++ b/corfu.el
@@ -566,13 +566,13 @@ FRAME is the existing frame."
(setcdr ,tail2 nil)
(setq ,list (cdr ,head1)))))
-(defun corfu--move-prefix-candidates-to-front (field candidates)
- "Move CANDIDATES which match prefix of FIELD to the beginning."
+(defun corfu--move-prefix-candidates-to-front (field cands)
+ "Move CANDS which match prefix of FIELD to the beginning."
(let* ((word (substring field 0
(seq-position field corfu-separator)))
(len (length word)))
(corfu--partition!
- candidates
+ cands
(and (>= (length it) len)
(eq t (compare-strings word 0 len it 0 len
completion-ignore-case))))))
diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
index 0ad8ff3edb..feaaed28a3 100644
--- a/extensions/corfu-history.el
+++ b/extensions/corfu-history.el
@@ -55,8 +55,8 @@ or the property `history-length' of `corfu-history'.")
(and (= (cdr x) (cdr y))
(corfu--length-string< (car x) (car y)))))
-(defun corfu-history--sort (candidates)
- "Sort CANDIDATES by history."
+(defun corfu-history--sort (cands)
+ "Sort CANDS by history."
(unless corfu-history--hash
(setq corfu-history--hash (make-hash-table :test #'equal :size (length
corfu-history)))
(cl-loop for elem in corfu-history for index from 0 do
@@ -65,13 +65,13 @@ or the property `history-length' of `corfu-history'.")
;; Decorate each candidate with (index<<13) + length. This way we sort first
by index and then by
;; length. We assume that the candidates are shorter than 2**13 characters
and that the history is
;; shorter than 2**16 entries.
- (cl-loop for cand on candidates do
+ (cl-loop for cand on cands do
(setcar cand (cons (car cand)
(+ (ash (gethash (car cand) corfu-history--hash
#xFFFF) 13)
(length (car cand))))))
- (setq candidates (sort candidates #'corfu-history--sort-predicate))
- (cl-loop for cand on candidates do (setcar cand (caar cand)))
- candidates)
+ (setq cands (sort cands #'corfu-history--sort-predicate))
+ (cl-loop for cand on cands do (setcar cand (caar cand)))
+ cands)
;;;###autoload
(define-minor-mode corfu-history-mode