branch: elpa/flx commit 7a2601481c4c75d8b4b036d85e0dabcfd6f3242a Author: PythonNut <python...@users.noreply.github.com> Commit: PythonNut <python...@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)))))