]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix performance regression in completion-pcm--all-completions
authorJoão Távora <joaotavora@gmail.com>
Fri, 27 Oct 2023 09:57:26 +0000 (04:57 -0500)
committerJoão Távora <joaotavora@gmail.com>
Fri, 27 Oct 2023 09:57:26 +0000 (04:57 -0500)
* lisp/minibuffer.el (completion-pcm--all-completions): Don't copy-sequence.

lisp/minibuffer.el

index b38eb49aba8df7aae04e2c4b5d3c45854db28b1a..c32bcee51ed8bd58b644c9f62805bcf975c0a981 100644 (file)
@@ -3738,10 +3738,9 @@ PATTERN is as returned by `completion-pcm--string->pattern'."
             (t
              ;; The pattern has something interesting to match, in
              ;; which case we take the opportunity to add an early
-             ;; completion-score cookie to each completion.
+             ;; `completion-score' cookie to each completion.
              (cl-loop with re = (completion-pcm--pattern->regex pattern 'group)
-                      for orig in completions
-                      for comp = (copy-sequence orig)
+                      for comp in completions
                       for score = (completion--flex-score comp re t)
                       when score
                       do (put-text-property 0 1 'completion-score