bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28774: Master, emacs-26: Can't add text property to built-in functio


From: Noam Postavsky
Subject: bug#28774: Master, emacs-26: Can't add text property to built-in function name.
Date: Tue, 10 Oct 2017 06:21:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Ilya Khaprov <ilya.khaprov@publitechs.com> writes:
>
> After commit :3db388b0bf the following stopped working:
>
> (global-set-key
>  "\M-x"
>  (lambda ()
>    (interactive)
>    (call-interactively
>     (intern
>      (ido-completing-read
>       "M-x "
>       (all-completions "" obarray 'commandp))))))

It seems ido-completions relies on (format "%s" str) to return a copy of
str.  This fixes it:

--- i/lisp/ido.el
+++ w/lisp/ido.el
@@ -4701,7 +4701,7 @@ ido-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]