From: Noam Postavsky Date: Thu, 12 Oct 2017 00:23:40 +0000 (-0400) Subject: Don't use (format "%s" ...) for string copying (Bug#28774) X-Git-Tag: emacs-26.0.91~571 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b78332c3c646be12d252a637ce0fc949919a840b;p=emacs.git 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. --- 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