diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-07-10 11:17:54 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-07-10 11:18:39 +0200 |
| commit | 2cd4bba3c746a91670a1d356531e27b77a21d058 (patch) | |
| tree | 8257a59f70e96c1adcab95956b22c5bd901dcb15 | |
| parent | b7099b4b714178da1d656b346f55b1742a55fd98 (diff) | |
Minor cleanup, reduce allocations
| -rw-r--r-- | corfu.el | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -723,10 +723,9 @@ FRAME is the existing frame." (defun corfu--format-candidates (cands) "Format annotated CANDS." - (setq cands - (cl-loop for c in cands collect - (cl-loop for s in c collect - (replace-regexp-in-string "[ \t]*\n[ \t]*" " " s)))) + (cl-loop for c in cands do + (cl-loop for s in-ref c do + (setf s (replace-regexp-in-string "[ \t]*\n[ \t]*" " " s)))) (let* ((cw (cl-loop for x in cands maximize (string-width (car x)))) (pw (cl-loop for x in cands maximize (string-width (cadr x)))) (sw (cl-loop for x in cands maximize (string-width (caddr x)))) |
