emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vertico 3f3e9d6b40 1/5: Rename variable


From: ELPA Syncer
Subject: [elpa] externals/vertico 3f3e9d6b40 1/5: Rename variable
Date: Wed, 19 Apr 2023 14:59:20 -0400 (EDT)

branch: externals/vertico
commit 3f3e9d6b4010f7058cf57d238e25f2601ca60b13
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Rename variable
---
 vertico.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/vertico.el b/vertico.el
index c05460a159..43f9d1f6d4 100644
--- a/vertico.el
+++ b/vertico.el
@@ -192,7 +192,7 @@ The value should lie between 0 and vertico-count/2."
   "Recompute history hash table and return it."
   (or (and (equal (car vertico--history-hash) vertico--base) (cdr 
vertico--history-hash))
       (let* ((base vertico--base)
-             (base-size (length base))
+             (base-len (length base))
              (hist (and (not (eq minibuffer-history-variable t)) ;; Disabled 
for `t'.
                         (symbol-value minibuffer-history-variable)))
              (hash (make-hash-table :test #'equal :size (length hist)))
@@ -202,13 +202,13 @@ The value should lie between 0 and vertico-count/2."
                           (abbreviate-file-name file))))
         (cl-loop for elem in hist for index from 0 do
                  (when (and (not (equal curr-file elem)) ;; Deprioritize 
current file
-                            (or (= base-size 0)
-                                (and (>= (length elem) base-size)
-                                     (eq t (compare-strings base 0 base-size 
elem 0 base-size)))))
-                   (let ((file-sep (and file-hist (string-search "/" elem 
base-size))))
+                            (or (= base-len 0)
+                                (and (>= (length elem) base-len)
+                                     (eq t (compare-strings base 0 base-len 
elem 0 base-len)))))
+                   (let ((file-sep (and file-hist (string-search "/" elem 
base-len))))
                      ;; Drop base string from history elements & special file 
handling.
-                     (when (or (> base-size 0) file-sep)
-                       (setq elem (substring elem base-size (and file-sep (1+ 
file-sep)))))
+                     (when (or (> base-len 0) file-sep)
+                       (setq elem (substring elem base-len (and file-sep (1+ 
file-sep)))))
                      (unless (gethash elem hash) (puthash elem index hash)))))
         (cdr (setq vertico--history-hash (cons base hash))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]