aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2017-10-11 20:23:40 -0400
committerNoam Postavsky2017-10-11 20:53:22 -0400
commitb78332c3c646be12d252a637ce0fc949919a840b (patch)
tree7e86c64a2ab73a3f6ee8de9dff76ebd8cac1aedf
parent078fb7f6df4178d5a35243dad164cdd196392e71 (diff)
downloademacs-b78332c3c646be12d252a637ce0fc949919a840b.tar.gz
emacs-b78332c3c646be12d252a637ce0fc949919a840b.zip
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.
-rw-r--r--lisp/ido.el2
1 files changed, 1 insertions, 1 deletions
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'."
4701 (if (and ido-use-faces comps) 4701 (if (and ido-use-faces comps)
4702 (let* ((fn (ido-name (car comps))) 4702 (let* ((fn (ido-name (car comps)))
4703 (ln (length fn))) 4703 (ln (length fn)))
4704 (setq first (format "%s" fn)) 4704 (setq first (copy-sequence fn))
4705 (put-text-property 0 ln 'face 4705 (put-text-property 0 ln 'face
4706 (if (= (length comps) 1) 4706 (if (= (length comps) 1)
4707 (if ido-incomplete-regexp 4707 (if ido-incomplete-regexp