From b78332c3c646be12d252a637ce0fc949919a840b Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 11 Oct 2017 20:23:40 -0400 Subject: [PATCH] Don't use (format "%s" ...) for string copying (Bug#28774) 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ido.el b/lisp/ido.el index 47cbcb63c69..4f1e36ba914 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -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 -- 2.39.5