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

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

[elpa] externals/consult 18c3a4edcf: Minor cleanup


From: ELPA Syncer
Subject: [elpa] externals/consult 18c3a4edcf: Minor cleanup
Date: Sat, 25 Jun 2022 07:57:25 -0400 (EDT)

branch: externals/consult
commit 18c3a4edcf258de1a34c57cf5ad28262f5435c32
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Minor cleanup
---
 consult.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/consult.el b/consult.el
index 7750df5d74..e4a2c96d50 100644
--- a/consult.el
+++ b/consult.el
@@ -2104,12 +2104,13 @@ PREVIEW-KEY are the preview keys."
 ;; By doing that, no accidential matching can occur.
 (defun consult--tofu-encode (n)
   "Return tofu-encoded number N."
-  (let ((str ""))
+  (let (str tofu)
     (while (progn
-             (setq str (concat (char-to-string (+ consult--tofu-char
-                                                  (% n consult--tofu-range)))
-                               str))
-             (and (>= n consult--tofu-range) (setq n (/ n 
consult--tofu-range)))))
+             (setq tofu (char-to-string
+                         (+ consult--tofu-char (% n consult--tofu-range)))
+                   str (if str (concat tofu str) tofu))
+             (and (>= n consult--tofu-range)
+                  (setq n (/ n consult--tofu-range)))))
     (add-text-properties 0 (length str) '(invisible t consult-strip t) str)
     str))
 



reply via email to

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