GNU bug report logs - #28774
[ido] Can't add text property to built-in function name.

Previous Next

Package: emacs;

Reported by: Ilya Khaprov <ilya.khaprov <at> publitechs.com>

Date: Tue, 10 Oct 2017 07:58:01 UTC

Severity: normal

Tags: fixed

Found in version 26.0.90

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 28774 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Ilya Khaprov <ilya.khaprov <at> publitechs.com>
Cc: 28774 <at> debbugs.gnu.org
Subject: Re: bug#28774: Master,
 emacs-26: Can't add text property to built-in function name.
Date: Tue, 10 Oct 2017 06:21:41 -0400
Ilya Khaprov <ilya.khaprov <at> 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






This bug report was last modified 7 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.