[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 71d3164636 1/3: Rename variable
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/vertico 71d3164636 1/3: Rename variable |
|
Date: |
Wed, 8 Nov 2023 12:59:25 -0500 (EST) |
branch: externals/vertico
commit 71d3164636b16da3555f056f2a1d11e961487177
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Rename variable
Prevent bugs due to change of calling convention.
---
extensions/vertico-flat.el | 2 +-
extensions/vertico-grid.el | 2 +-
vertico.el | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/extensions/vertico-flat.el b/extensions/vertico-flat.el
index 4a2ce7a43c..6c7d18eee8 100644
--- a/extensions/vertico-flat.el
+++ b/extensions/vertico-flat.el
@@ -110,7 +110,7 @@
(while (and candidates (not (eq wrapped (car candidates)))
(> width 0) (> count 0))
(let ((cand (pop candidates)) (prefix "") (suffix ""))
- (setq cand (funcall vertico--highlight (substring cand)))
+ (setq cand (funcall vertico--hilit (substring cand)))
(pcase (and vertico-flat-annotate (vertico--affixate (list cand)))
(`((,c ,p ,s)) (setq cand c prefix p suffix s)))
(when (string-search "\n" cand)
diff --git a/extensions/vertico-grid.el b/extensions/vertico-grid.el
index dc752941e0..58100c67ce 100644
--- a/extensions/vertico-grid.el
+++ b/extensions/vertico-grid.el
@@ -148,7 +148,7 @@ When scrolling beyond this limit, candidates may be
truncated."
(funcall (if (> vertico-grid-annotate 0) #'vertico--affixate
#'identity)
(cl-loop for i from 0 below count
for c in (nthcdr start vertico--candidates)
- collect (funcall vertico--highlight (substring
c))))))
+ collect (funcall vertico--hilit (substring c))))))
(width (make-vector vertico-grid--columns 0)))
(dotimes (col vertico-grid--columns)
(dotimes (row vertico-count)
diff --git a/vertico.el b/vertico.el
index 91e39e4cbb..07bfda6e3a 100644
--- a/vertico.el
+++ b/vertico.el
@@ -140,7 +140,7 @@ The value should lie between 0 and vertico-count/2."
"M-RET" #'vertico-exit-input
"TAB" #'vertico-insert)
-(defvar-local vertico--highlight #'identity
+(defvar-local vertico--hilit #'identity
"Lazy candidate highlighting function.")
(defvar-local vertico--history-hash nil
@@ -354,7 +354,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
(vertico--metadata . ,vertico--metadata)
(vertico--candidates . ,all)
(vertico--total . ,(length all))
- (vertico--highlight . ,(or hl #'identity))
+ (vertico--hilit . ,(or hl #'identity))
(vertico--allow-prompt . ,(or def-missing (eq vertico-preselect 'prompt)
(memq minibuffer--require-match
'(nil confirm
confirm-after-completion))))
@@ -483,7 +483,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
"Format group TITLE given the current CAND."
(when (string-prefix-p title cand)
;; Highlight title if title is a prefix of the candidate
- (setq title (substring (funcall vertico--highlight
+ (setq title (substring (funcall vertico--hilit
(propertize cand 'face
'vertico-group-title))
0 (length title)))
(vertico--remove-face 0 (length title) 'completions-first-difference
title))
@@ -544,7 +544,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
;; `completion--twq-all' hack. This should better be fixed in Emacs
;; itself, the corresponding code is already marked with a FIXME.
(vertico--remove-face 0 (length cand) 'completions-common-part cand)
- (concat vertico--base (if hl (funcall vertico--highlight cand) cand))))
+ (concat vertico--base (if hl (funcall vertico--hilit cand) cand))))
((and (equal content "") (or (car-safe minibuffer-default)
minibuffer-default)))
(t content))))
@@ -576,7 +576,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
(vertico--affixate
(cl-loop for i from 0 below vertico-count
for c in (nthcdr index vertico--candidates)
- collect (funcall vertico--highlight (substring c))))))
+ collect (funcall vertico--hilit (substring c))))))
(pcase-dolist ((and cand `(,str . ,_)) candidates)
(when-let (new-title (and group-fun (funcall group-fun str nil)))
(unless (equal title new-title)