]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use (format "%s" ...) for string copying (Bug#28774)
authorNoam Postavsky <npostavs@gmail.com>
Thu, 12 Oct 2017 00:23:40 +0000 (20:23 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 12 Oct 2017 00:53:22 +0000 (20:53 -0400)
As of 2017-10-04 'Speed up (format "%s" STRING) and the like', (format
"%s" STRING) no longer produces a new string.
* lisp/ido.el (ido-completions): Use `copy-sequence' to make a new
string, so that we can add text properties to (copies of) symbol
names.

lisp/ido.el

index 47cbcb63c69c42bc66c0b14efba52f0a0030475e..4f1e36ba914d55488d02986ca738ee2c516cbcdc 100644 (file)
@@ -4701,7 +4701,7 @@ Modified from `icomplete-completions'."
     (if (and ido-use-faces comps)
        (let* ((fn (ido-name (car comps)))
               (ln (length fn)))
-         (setq first (format "%s" fn))
+         (setq first (copy-sequence fn))
          (put-text-property 0 ln 'face
                             (if (= (length comps) 1)
                                  (if ido-incomplete-regexp