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

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

[nongnu] elpa/flx 7a2601481c 142/182: Simplify flx-propertize


From: ELPA Syncer
Subject: [nongnu] elpa/flx 7a2601481c 142/182: Simplify flx-propertize
Date: Tue, 13 Dec 2022 03:59:38 -0500 (EST)

branch: elpa/flx
commit 7a2601481c4c75d8b4b036d85e0dabcfd6f3242a
Author: PythonNut <PythonNut@users.noreply.github.com>
Commit: PythonNut <PythonNut@users.noreply.github.com>

    Simplify flx-propertize
---
 flx.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/flx.el b/flx.el
index 86d4b64ec3..9c2a9f8473 100644
--- a/flx.el
+++ b/flx.el
@@ -331,14 +331,13 @@ SCORE of nil means to clear the properties."
                  (substring-no-properties (car obj))
                (substring-no-properties obj))))
 
-    (unless (null score)
-      (cl-loop for char in (cdr score)
-            do (progn
-                 (when (and last-char
-                            (not (= (1+ last-char) char)))
-                   (put-text-property block-started  (1+ last-char) 'face 
'flx-highlight-face str)
-                   (setq block-started char))
-                 (setq last-char char)))
+    (when score
+      (dolist (char (cdr score))
+        (when (and last-char
+                   (not (= (1+ last-char) char)))
+          (put-text-property block-started  (1+ last-char) 'face 
'flx-highlight-face str)
+          (setq block-started char))
+        (setq last-char char))
       (put-text-property block-started  (1+ last-char) 'face 
'flx-highlight-face str)
       (when add-score
         (setq str (format "%s [%s]" str (car score)))))



reply via email to

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