emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 b78332c: Don't use (format "%s" ...) for string c


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 b78332c: Don't use (format "%s" ...) for string copying (Bug#28774)
Date: Wed, 11 Oct 2017 20:53:42 -0400 (EDT)

branch: emacs-26
commit b78332c3c646be12d252a637ce0fc949919a840b
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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 47cbcb6..4f1e36b 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]